Introduction to JSON
What is JSON? JSON_Syntax JSON_Data Types JSON_vs_XML JSON_Array JSON_Object
JSON stands for JavaScript Object Notation. JSON is a data-interchange format that enables applications to communicate over the network. JSON represents data as an attribute with values. JSON is based on a JavaScript web application. Nowadays most of the World Wide Web applications use this JSON format.
This JSON format is used as an alternative to the XML(Extended Markup Language) format. the JSON encapsulates data between client and server. JSON was originally invented by Douglas Crockford in 2001 and was described by RFC 4627. JSON is a data language for all RESTful APIs. Most modern technologies and languages provide excellent support for JSON data format (e.g.: Java, JavaScript, Python, PHP, Ruby, C#, and Groovy). JSON also works with Node.js and NoSQL (e.g: MongoDB).
What is JSON?
- JSON is a lightweight data interchange format for transmitting data between server and client applications.
- JSON uses human-readable text for reading and writing.
- Also easy for machines to parse and generate.
- JSON uses JavaScript syntax for object notion.
- Here we use the filename extension is .json.
Why JSON?
- JSON replaces the XML data format, the reason is that XML uses begin and end tag for each data element but JSON doesn't need that much begin and end tag.
- JSON is very simple and easy to read.
- JSON's structures are easily understood by the program developer.
- Due to their simplicity, N-number of RESTful APIs were developed faster based on JSON (e.g.: LinkedIn, Facebook, Twitter, Amazon Web Services (AWS), etc...).
- The rising of JavaScript increases the popularity of JSON because JavaScript's objects look similar to JSON's objects. So the Douglas Crockford conclude that JSON is a subset of JavaScript's Object notation.
- Now JSON is widely used in the products like Node.js and Sublime Text (a popular IDE for web development).