i have never used JSON and want to find more about it as people keep referring to it as a better version of XML for sending data from client to server.
can someone please suggest a good resource
i have never used JSON and want to find more about it as people keep referring to it as a better version of XML for sending data from client to server.
can someone please suggest a good resource
JSON for the masses is pretty straightforward.
If you understand XML, you can understand:
And last, but not least, the obligatory list of resources, and wikipedia.
The best I can think of is:
www.json.org
Keep in mind that JSON and XML are different things, as explained in some or the articles linked in that site.
But if it's just for sending data, usually JSON is more compact than XML.
JSON is very simple, http://www.json.org/ seems to be a good instruction. It's just like that:
{
"key1" : "value",
"key2" : 123,
"key3" : [
1,
2,
3
],
"key4" : {
"key5" : "value",
"key6" : "other value"
}
}
{ } define an object, and [ ] an array.
It's really a pretty simple concept. You have Objects and Arrays, and a few primitive datatypes (strings, numbers, booleans, and null).
Add commas, curly brackets, and square brackets.
I really like it's simplicity, I can write my own parser for it without too much hassle pretty easily if needed (Which usually is not the case due to so many libraries for it out there).