Easy Tutorial
❮ Json Vs Xml Home ❯

JSON Tutorial


JSON: JavaScriptObjectNotation (JavaScript Object Notation)

JSON is a syntax for storing and exchanging text information, similar to XML.

JSON is smaller, faster, and easier to parse than XML.

JSON is easy for humans to read and write.

Programming languages such as C, Python, C++, Java, PHP, Go, etc., support JSON.

JSON Example

{
    "sites": [
    { "name":"tutorialpro.org" , "url":"www.tutorialpro.org" }, 
    { "name":"google" , "url":"www.google.com" }, 
    { "name":"微博" , "url":"www.weibo.com" }
    ]
}

This sites object is an array containing 3 site records (objects).


What is JSON?


JSON - Converting to JavaScript Object

The JSON text format is syntactically identical to the code for creating JavaScript objects.

Due to this similarity, a JavaScript program can use the built-in eval() function to convert JSON data into native JavaScript objects.

❮ Json Vs Xml Home ❯