JSON: The 5 minute lesson

What is Json ?

JSON stand for  JavaScript Object Notation.
It is a lightweight text-based open standard designed for human-readable data interchange.
It is derived from the JavaScript  programming language for representing simple data structures and associative arrays, called objects.
Despite its relationship to JavaScript, it is language-independent, with parsers available for virtually every programming language. The JSON filename extension is .json.

It is easy for humans to read and write. It is easy for machines to parse and generate.

Exmaple:

{"skillz": {
"web":[
{"name": "html",
"years": "5"
},
{"name": "css",
"years": "3"
}],
"database":[
{"name": "sql",
"years": "7"
}]
}}

Squiggles, Squares, Colons and Commas

1. Squiggly brackets act as ‘containers’ { }
2. Square brackets holds arrays [ ]
3. Names and values are separated by a colon. :
4. Array elements are separated by commas. ,

Share

4 thoughts on “JSON: The 5 minute lesson

  1. steve

    json can be used as an alternative to xml. Commonly it is used in web services where data is exchanged between a service and it’s clients via xml or json

Leave a Reply

Your email address will not be published. Required fields are marked *