json

Adding spaces and special characters to JSON Key IN CODEIGNITER

I have json object like this, the site is running codeigniter which is ultimately the problem. var obj = { states : { 'state' : {cities : ['city', 'city2', 'another']}, } } the problem is some states have special characters like , or spaces. When those states get added I get a Disallowed Key Characters. error....

Simplest REST-service for real time chart drawing program demo

Real time Chart drawing program can work with different datasources, REST-service is one of them. I need any free REST service for a demo. For example, chart program sends request to http://google.com/woof/woof every second and gets current NASDAQ, or smth else fast changeable (for pretty plotting). This service have to return just nu...

I need a simple java example of processing a JSON response via HTTP for Android App ?

I am writing a simple Android app and have a database that will send back information into the app. I am new to Android and am looking for a simple example that demonstrates how the Android App can process a JSON response received from a HTTP request. I need to see what classes are used for Android apps to process a HTTP response. A ref...

How to read JSON using Flash

To read JSON using as3, are there any built in methods? It would be better if we get some code samples ...

Twitter $get help

Just wondering if someone can assist me with the following issue. I have come across the following code which pulls in latest Twitter posts and displays them on a site: //Handle the scrolling of the tweets in the footer $(function () { var tweetVP = $("#footerTweetsViewport"); arrTweetNav = ECC.tweetArray(); thisTweetID = a...

ASP.NET WCF Service does not return any results

Hi, I'm having trouble with my WCF Service. I want my method to return a list formatted in JSON. When i invoke the method, my response is empty. Even when i set the method's BodyStyle to be Wrapped. It works if i return null, the output then becomes: null and with BodyStyle set to Wrapped: { VerwerkStatus: null } If i debug...

How do I create Json requests in Objective C

I have a great framework however I cannot figure out how to create requests. All the tutorials assume you are simply downloading and parsing Json data - but I need to build a Json request send it off and then parse the response. Anyone have ideas and in particular sample code which builds up the request. ...

JSON Date parameter passed to MVC Action is always null

I have a range of parameters that are passed via jQuery Ajax to an MVC JsonResult action. For the most part, these arrive successfully, but there is a Date value that is not arriving at all. What considerations / formats do I need to use - or what approaches do I need to take - in order to get this date to arrive successfully? ...othe...

Jquery JSON parsing with @id:

Hello, I have the following JSON: { "@id": "hey there", "id": "hey there 2" } I can easily parse "id" with json.id but how can I get the value of "@id" using jquery's inbuilt JSON parser? As calling "json.@id" is not correct. Thanks ...

Spot the error - Mixing: php data objects (fetch object), json, and jquery.post().

Can anyone better experienced then me, spot the issue here. I'm unable to debug it, my var_dumps don't seem to get any effect due to the use of jquery.post() so I believe. I get nothing displayed. I was expecting to receive a li series filled with json encoded values. The HTML: <div id='data'></div> <form action=""> <input id="nome...

Processing multiple JSON Objects in one file

I did something stupid... I gathered a big tonne of json data and saved it in one file. I now find myself getting errors when I try JSON.parse(file) due to the fact that its JSON object after JSON object. Can anyone advise on how I can parse this data? The strcture looks as follows. The next entry is a object with the exact same structur...

Passing a date with JSON to .NET

Here is my jQuery code: function onSaveClicked() { var message = { MessageID: $("#MessageID").val() || 0, MessageDate: "\/Date(<%= DateTime.Now.Ticks %>)\/", }; $.ajax({ url: "<%= Url.Action("SaveMessage") %>", type: "POST", dataType: "json", data: $.toJSON(message), ...

Best way to submit search criteria to the server with AJAX?

Hi. Please consider the following HTML: <input type='text' id='name'/> <option id='option'> <select value='1'>hi</select> <select value='2'>bye</select> </option> <input type='text' id='date'/> This is a very simple form used to get search criteria from a user. I need to submit this search criteria to the server with an AJAX call...

Help with select list population from a json object.

hallo Thank you for your answers. I tried 2 codes but it does not work.i have a JSON object look like this [{"name":"aaa","0":"aaa","city":"paris","1":"paris","school":"gtdzh","2":"gtdzh"}, {"name":"bbb","0":"bbb","city":"berlin","1":"berlin","school":"gdezh","2":"gdezh"}, {"name":"ccc","0":"ccc","city":"new york","1":"new york","scho...

Struts2 json ajax and also custom return type

I am trying to do a result type of "json" from my struts2 action. Here is the configuration I have in my code. Struts.xml: <package name="example" namespace="/" extends="json-default"> <action name="vendorList" class="com.stg.providerportal.actions.AjaxVendorListAction"> <result name="success" type="json"></result> </act...

Can't decode JSON string in php

I have the following JSON string, i try to decode with php json_decode but $postarray is always NULL, can't work out why this is? Running on Debian 5.0 Linux php Client API version => 5.0.51a Json version 1.2.1 $json = '{\"json\":[{\"username\":\"1062576\",\"accountId\":\"45656565\"}]}'; $postarray = json_decode($json); print_r($po...

In jQuery, how do I use the returned JSON object in other class methods?

I have constructed a class in js/jQuery: function JSONRequest(request_id, type){ this.request_id = request_id; JSONsvc ='json_dispatch.php'; this.type = type; } JSONRequest.prototype.query = function() { $.getJSON(JSONsvc, {request_id:this.request_id, type:this.type}, function(data) { ...

json in python format

{"required_items":[ { "filename":"abcd", "no":"3" }, { "filename":"abc", "no":"2" } ]} I am not getting the code of the JSON format in Python - I want to insert t...

oauth & POSTing JSON

Reading section 9.1 of OAuth Core 1.0, I only see a reference to performing POST requests using content-type of application/x-www-form-urlencoded. How does one go about performing POST requests with JSON data in the request body? How does handle the signing? Is it at all possible? Can this work on AppEngine? ...

Help with JSON raw format in javascript.

I have a JSON array of data which is [ [[2, 5], [6, 10], [10, 7], [11, 15]], [[0, 9], [1, 16], [3, 19], [4, 15]], [[0, 7], [5, 16], [8, 17], [12, 19]] ] but when I try to get the first array of [[2, 5], [6, 10], [10, 7], [11, 15]] using jsonData[0] I get the data as 2,5,6,10,10,7,11,15. I would like to get the data in the JSON ...