Technical info.

Tuesday, July 12, 2016

Node.js tutorial 5 - What's JSON?


JSON specification is described in ECMA-404. you can easily find it in here
The specification also very simple, the real contents are in only 5 pages.

Here's one of the example JSON data. I'm copied from Wiki page. For more information, please visit JSON wiki page


Not only the machine which treat this data but also you can read it and understand the meaning of data.
{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 25,
  "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"
    },
    {
      "type": "mobile",
      "number": "123 456-7890"
    }
  ],
  "children": [],
  "spouse": null
}

No comments:

Post a Comment