Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This as become a standard that happened kind of organically. It was not planned by a central committee. It represents a subset of Javascript notation:

Code Block
languagejs
{
  "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?

...