/
JSON - JavaScript Object Notation
JSON - JavaScript Object Notation
This has become a standard that happened kind of organically. It was not planned by a central committee. It represents a subset of Javascript notation:
{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 27,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
}
],
"children": ['Mary', 'John', 'Beth'],
"spouse": null
}
JSON is a much simpler standard for data interchange than say XML. Why is that?
Well from Javascript history we know that it was developed by a single designer. Brendan Eich did a good job of the core of Javascript and it was popularized by Douglas Crockford.
Why is JSON good? Well it boils data down to very fundamental structures - simple types - strings and numbers, arrays and dictionaries.
See http://www.json.org/ for a full description of the JSON standard.
, multiple selections available,
Related content
Javascript Variables - Covering the core types
Javascript Variables - Covering the core types
More like this
How do we make a Javascript sandbox
How do we make a Javascript sandbox
Read with this
What benefits would rewriting the JSON parser give us?
What benefits would rewriting the JSON parser give us?
More like this
Using Prefixed Name Spaces with Javascript
Using Prefixed Name Spaces with Javascript
Read with this
Javascript Object
Javascript Object
More like this
How do we have a Javascript callback when the page is loaded?
How do we have a Javascript callback when the page is loaded?
Read with this