All Questions

650
votes
29answers
977717 views

How to parse JSON

I have the following JSON text that I need to parse to get pageName, pagePic, post_id, etc. What is the required code? { "pageInfo": { "pageName": "abc", "pagePic": "http://exam...
111
votes
2answers
142883 views

How do I extract data from JSON with PHP?

This is intended to be a general reference question and answer covering many of the never-ending "How do I access data in my JSON?" questions. It is here to handle the broad basics of decoding JSON...
1434
votes
16answers
1685517 views

Parse JSON in JavaScript?

I want to parse a JSON string in JavaScript. The response is something like var response = '{"result":true,"count":1}'; How can I get the values result and count from this?
51
votes
4answers
377567 views

How to parse JSON in Android

Where can I find step-by-step instructions on how to parse a JSON feed in Android? I'm just an Android beginner wanting to learn.
1730
votes
7answers
379973 views

What is JSONP all about?

I understand JSON, but not JSONP. Wikipedia's document on JSON is (was) the top search result for JSONP. It says this: JSONP or "JSON with padding" is a JSON extension wherein a prefix is specifie...
1366
votes
49answers
821983 views

Convert form data to JavaScript object with jQuery

How do I convert all elements of my form to a JavaScript object? I'd like to have some way of automatically building a JavaScript object from my form, without having to loop over each element. I do ...
408
votes
13answers
591667 views

jQuery AJAX cross domain

Here are two pages, test.php and testserver.php. test.php <script src="scripts/jq.js" type="text/javascript"></script> <script> $(function() { $.ajax({url:"testserver.p...
546
votes
41answers
451413 views

How to compare arrays in JavaScript?

I'd like to compare two arrays... ideally, efficiently. Nothing fancy, just true if they are identical, and false if not. Not surprisingly, the comparison operator doesn't seem to work. var a1 = [1,2...
263
votes
14answers
514013 views

How can I parse a JSON file with PHP?

I tried to parse a JSON file using PHP. But I am stuck now. This is the content of my JSON file: { "John": { "status":"Wait" }, "Jennifer": { "status":"Active" }, ...
700
votes
21answers
454645 views

Deserialize JSON into C# dynamic object?

Is there a way to deserialize JSON content into a C# 4 dynamic type? It would be nice to skip creating a bunch of classes in order to use the DataContractJsonSerializer.

Previous Next