json

Qooxdoo REST JSON request problem - unexpected token and then timeout

Hello! I am learning Qooxdoo framework and I am trying to make it work with a small Django web service. Django webservice just returns JSON data like this: { "name": "Football", "description": "The most popular sport." } Then I use the following code to query that url: var req = new qx.io.remote.Request(url, "GET", "application/json...

Soapui mocking services which return json

Microsoft Ajax can expose webservices which respond with json or xml depending on configuration. I would like to mock these services using soap ui. Using the wsdl I can do this to mock the services in the case where xml is returned, however how can I mock the response when JSON is returned? ...

php 5.1.6 json_encode and codeigniter

Im building a codeigniter app which uses json_encode to provide ajax data in many places... today I learned that the server has php 5.1.6 which doesnt support this method (or json_decode).. what can I do?? please help. ...

JSON Search and remove in php?

Hello! I have a session variable $_SESSION["animals"] containing a deep json object with values: $_SESSION["animals"]='{ "0":{"kind":"mammal","name":"Pussy the Cat","weight":"12kg","age":"5"}, "1":{"kind":"mammal","name":"Roxy the Dog","weight":"25kg","age":"8"}, "2":{"kind":"fish","name":"Piranha the Fish","weight":"1kg","age":"1"}, "...

Pagination - Twitter's people you follow

Hi guys, im developing an Android application for twitter that will sync data coming from the people you follow. The problem is that: http://api.twitter.com/1/statuses/friends.json provides me the last 100 persons ive followed and i wanted to display only 20 for each 'page'. I believe that the 'cursor' parameter doesnt do what i nee...

What is the recommended way for calling remote JSON objects from native blackberry apps?

Dear all, IF I am to develop a native application on blackberry, what would be the recommended way to call remote JSON object? As I understand native blackberry apps is coded using Java, would it still be able to contact a remote JSON object from Ruby on Rails? Has there been any blackberry framework to ease this use case? Thank you ve...

javascript html object model and template engine

I am looking for javascript library which can do something like var items = [1,2]; var html = div( ul({id:"some-id", class:"some-class"})(items.each(function(item){ return li(item); }) ); html == "<div><ul id='some-id' class='some-class'><li >1</li><li>2</li></ul></div>" ...

What is the difference between JSON and Object Literal Notation?

Hi, Can someone tell me what is the main difference between a Javascript object defined by using "Object Literal Notation" and JSON object? According to a Javascript book it says this is an object defined by using Object Notation: var newObject = { prop1 : true, showMessage : function (msg) {alert(msg)} }; Why it is not a JS...

Facebook Graph API: Feed publishing showing up as link type instead of status?

So I'm publishing to a Facebook Group's Feed in my app, using the Graph API. It works fine, except facebook keeps treating the published info as a 'link' feed item type instead of 'status' like it does when I enter the same from facebook's site. eg: string url = "https://graph.facebook.com/&lt;id-of-group/feed?access_token=&lt;access-...

How can i supply an AntiForgeryToken when posting JSON data using $.ajax ?

I am using the code as below of this post: First i will an fill array variable with the correct values for the controller action. Using the code below i think it should be very straigtforward by just adding the following line to the javascript: data["__RequestVerificationToken"] = $('[name=__RequestVerificationToken]').val(); The <%=...

Handling big user IDs returned by FQL in PHP

I'm using FQL to retrieve a list of users from Facebook. For consistency I get the result as JSON. This causes a problem - since the returned JSON encodes the user IDs as numbers, json_decode() converts these numbers to floating point values, because some are too big to fit in an int; of course, I need these IDs as strings. Since json_...

How to remove $ from associative array using Json_decode in php?

I am trying to use the youtube API to pulldown some videos for my site. Currently am running this code here: //Youtube Videos Pull Down $youtubeURL = "http://gdata.youtube.com/feeds/api/videos?alt=json&amp;q=cats+cradle+chapel+hill&amp;orderby=published&amp;max-results=10&amp;v=2"; $youtubeSearch = file_get_contents($youtubeURL, true);...

Getting a specific number of JSON items with jQuery from tumblr feed

Hello all. I'm trying to populate a page with X entries from my tumblr feed, and I'm wondering how I can only pull that X number from the JSON object it returns. Here's my code, pulled from another Stack Overflow post and modified: //Tumblr retrieval $.getJSON("http://tumblr-address/api/read/json?callback=?", function(data) { $...

JSON decoding and encoding in .NET?

Possible Duplicate: What JSON library works well for you in .NET? Hello I am needing to encode and decode some data to/from the JSON format. Is there anything to help me with this task in .Net? It will be used in both ASP.Net and regular Winforms projects. ...

JSON documentation standard?

Is there a recognized, recommended, or standard form for representing the structure of JSON? E.g., my service returns a structure, effectively, represented as JSON. How do I describe what my service returns, such that another service can consume that JSON and program to its interface? ...

Cascading dropdownlist jQuery does not retain value on post back.

I have two html select server control on an add data form page. The user selects a value in the first html select server control and then values are populated into the second html select server control with jquery. The problem is when a a user clicks the save button and the page posts back, the values are no longer in the drop down list...

Pass object using JSON

Hello All right now i am using Json for passing status and message like return Json(new { Success = true, Message = "Save successfully" }); Project model=new Project() Is there any way, i can send model in json also? I am using c# and asp.net mvc ...

How to generate JSON object on client side and send it to server?

I have ExtJS based application. I have compound object on the server side, and have ExtJS window with few tabs for editing different parts of this one object. For example: I Have Compound object "Car" public class Car { public string Name; public string Color; public List<Wheel> Wheels; public List<Door> Doors; } And on ...

Deleteing JSON object from an array creates "undefined" objects

Hi All, i am haveing some problems with JSON and arrays. I have been messing around with JSON for a little while and am trying to use some in production by refactoring a old implementation. What i had was two hidden textfields, one store ids in the format [1][2][3] etc and the other name [name1][name2][name3] so i thought this would b...

Python read multiline JSON

I have been trying to use JSON to store settings for a program. I can't seem to get Python 2.6 's JSON Decoder to decode multi-line JSON strings... Here is example input: .settings file: """ {\ 'user':'username',\ 'password':'passwd',\ }\ """ I have tried a couple other syntaxes for this file, which I will specify below (with th...