json

Is it advisable to send/return data in .plist format to/from an API being accessed via iOS?

We're deciding between using JSON vs. Property List (binary) for our API, which will be accessed by iPhone/iPad/iPod Touch. Are there any speed advantages? ...

PHP json_encode as object after PHP array unset()

I'm experiencing odd behavior with json_encode after removing a numeric array key with unset. The following code should make the problem clear. I've run it from both the CLI and as an Apache mod: PHP version info: C:\Users\usr\Desktop>php -v PHP 5.3.1 (cli) (built: Nov 20 2009 17:26:32) Copyright (c) 1997-2009 The PHP Group Zend Engine...

Deserialize a Json string (in C#) without Json.Net

Hi everybody, I use the following lines to deserialize simple Json strings like this: string jSon = "{\"FirstName\":\"Foo\", \"LastName\":\"Bar\"}"; System.Web.Script.Serialization.JavaScriptSerializer oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer(); Person personDeserialized = oSerializer.Deserialize<Person>(j...

How to retrieve the content/file in JSP?

Hi, everyone, I have a question about the JSP. I have a JSON file in the server and the content is like the following: { "class": { "number": 2, "student": { "name": "Tom", "age": 1 }, "student": { "name": "May", "age": 2 } } } when I ...

encodeURIComponent and urldecode removes slashes, why?

Hello I am using JSON.stringify for an array of arrays, and it returns this: '[ ["<span pt=\"7.5\" idfont=\"Humnst777 Cn BT-Bold\">Javelin</span>","0","0"], ["<span idfont=\"Humnst777 Cn BT-Bold\">Javelin&co</span>","0","0"] ]'; It is correct but i have to use encodeURIComponent (& present) to post this value with js. The problem...

Web Application Framework - HTML5 with mobile devices JavaScript support

Hello all! I searched for Java based web application frameworks the last few days. I have to build a Java EE backend and a HTML5/CSS3/JavaScript frontend which can be accessed with multi-touch capable devices. So I will need modern JavaScript frameworks like Sencha Touch. My backend should be built upon with Java EE, Hibernate and MySQ...

How to reference JSON serialization in ClassLibrary?

What library I need to reference to use System.Web.Script.Serialization in Class Library? System.Web has been already referenced but using System.Web.Script.Serialization; still failed. Target Framework is 4.0. In WebApplication project everything is fine. ...

No response from MediaWiki API using jQuery

Hi. I've tried to get some content from Wikipedia as JSON: $.getJSON("http://en.wikipedia.org/w/api.php?action=query&amp;prop=revisions&amp;rvprop=content&amp;titles="+title+"&amp;format=json", function(data) { doSomethingWith(data); }); But I got nothing in response. If I paste to browser adressbar something like that: http://en...

Is there a MVC approach that uses PHP for Model and Controller and pure HTML for view while transporting data between them with JSON?

Hello, I just wondered if there is any existing framework or someone has experiences with using entirely static HTML templates that get filled with data provided via JSON from the server. The HTML pages with JavaScript support should fulfill the role of the View whereas Controller and Model are handled by the PHP on the server side. V...

SBJsonParser: App crashes if I do not retain the return value

I create/push my ViewController, display some informations and navigate back to my RootViewController. While I navigate back the app crashes (EXC_BAD_ACCESS). With Instruments I found out that the dealloc of my ViewController is called, which releases my wrapper class. In my wrapper class also the dealloc method is called. This dealloc ...

convert string to json array

I get this response from an Ajax request. Javascript seems to intepret it as a string. (When I say alert this.responseText, the whole string is shown) How can i convert it to a javascript object (JSON)? {"response": { "success": "The activity has been removed", "message": "0" } } I am not using jquery. ...

Is there a way to use google analytics to track calls to a json response?

I am working on a app that uses a json response from my Zend Framework 1.10 website. I want to track how many times the Json Action is hit? If there is no true way to do this from just the action that is not reflected the json response. ...

Json.NET (Newtonsoft.Json) - Two 'properties' with same name?

Hi all I'm coding in C# for the .NET Framework 3.5. I am trying to parse some Json to a JObject. The Json is as follows: { "TBox": { "Name": "SmallBox", "Length": 1, "Width": 1, "Height": 2 }, "TBox": { "Name": "MedBox", "Length": 5, "Width": 10, "Height": 10 }, ...

How can I parse anyType {----} response with ksoap2

I have seen many forum questions about this, but i haven't found a solution that works for me. THis is my code: String serviceURL = "http://www.mywebsite.com/WebService.asmx"; String serviceNamespace = "http://tempuri.org/"; String serviceMethod = "getUser"; String SoapAction = "http:...

parsing the Json Data

Hi Team! Here I am posting my Json Response below: {"ResultSet": {"Result":[ {"Phone":"(650) 473-9999", "Distance":"2.59", "MapUrl":"http://maps.yahoo.com/maps_result?q1=441+Emerson+St+Palo+Alto+CAgid1=28734629", "Categories": {"Category":[ {"content":"Salad Restaurant...

Get information from JSON

So currently I am doing this.. function get_info($data) { $json = file_get_contents("http://site.com/".$data.".json"); $output = json_decode($json, true); return $output; } which is fine and returns everything like this: array(1) { ["allocation"]=> array(20) { ["carrier_ocn"]=> string(4) "6664" ["available_on"]=> NULL ["...

How do I consume JSON from a web service in ASP.NET?

We have a web application providing a service using a simple REST interface (GET/POST methods) and returning results in JSON format. A client wants to use the service from an ASP application (I assume ASP.NET) and asks for example code. Is there any standard/widely-acceptable procedure for consuming JSON based web services from an ASP....

Loop Through JSON List How and What is Problem with script?

Following is the Script i am working that will indicate the Feature Detection for Firefox i created a Json list i want to call each to check in the script to see wehther its undefined or not but its not working can someone help me i am too much exhausted....!! <html> <head> <script type="text/javascript"> var JsonList = { "CheckSe...

ASP.NET JavaScriptSerializer requires HttpResponse?

Hi It appears that the System.Web.Script.Serialization.JavascriptSerializer class tries to obtain the HttpResponse for the current request, presumably to apply appropriate character encoding. However this means that when you to to use the class with no HttpContext in scope, it blows up with the following exception + stack trace: [Ht...

Data Binding in Asp.net For JQPlot Charts

Hi All, I have a problem in binding data to the JQ Plot <script type="text/javascript" language="javascript"> $(document).ready(function () { // $.jqplot.config.enablePlugins = true; var goog = [ ['6/22/2009', 425.32], ['6/8/2009', 424.84], ['...