What is JSON – JSON Complete Tutorial
JSON is the syntax for storing and exchanging textual information. Similar to XML.
JSON is smaller, faster, and easier to parse than XML.
· JSON is a lightweight text data exchange format
· JSON is self-explanatory and easier to understand
Same as XML
· JSON has a “self-descriptive” (human-readable)
· JSON has a hierarchy (values have values)
· JSON data can be transmitted using AJAX
Difference with XML
· Do not use reserved words
Why use JSON?
JSON is faster and easier to use than XML for AJAX applications:
· Use the XML DOM to loop through the document
· Read the value and store it in a variable
· Use eval () to handle JSON strings