In this tutorial we will try to cover everything you need to know about JSON. We will cover what JSON is, why JSON is important, why JSON is used for, the syntax of JSON, examples of JSON, and the features of JSON.

What is JSON ?

JSON stands for JavaScript Object Notation .JSON is a light weight data-exchange format which is used to exchange the data between client and server side application .JSON is the most popular data representation format .

JSON stores the data in a key,value pair format .JSON format are more readable for human being . JSON data structure is easily understandable by a non technical person .JSON is commonly used for APIs and Configs .

JSON example :

{
  "Student": {
    "name": "Neha Kumari",
    "roll_no": "004",
    "class": "BCA",
    "subject": "Computer science"
  }
}

If you observe normally JSON data will have square brackets and curly brackets.The square bracket represents starting of an JSONArray node whereas curly bracket represents JSONObject. Here “name”,”roll_no”,”class” and “subject” is said to be key and “Neha Kumari”,”004″,”BCA” and “Computer science” is said to be value .

JSON Data is always structured in key-value pair . JSON support different kind of datatypes String, Numbers, null, Objects, Array and Booleons .The official mediaType of JSON format is application/json .The filename extension is .json .

JSON is based on JavaScript Programming language and Json is language independant i.e. it support on all major programming languages like c++,java,Python etc.

Douglas Crockford was originally specified the JSON format . Since JSON is a lightweight format so it becomes easier to get and load the requested data quickly.

Features of JSON :

JSON is the best alternative to xml for storing data in files .It is easy to parse and access data stored in JSON format .

  • JSON is a lightweight data-interchange format .
  • JSON format are more readable and easily understandable by a non technical person .
  • Json is language independant .
  • JSON Data is always structured in key-value pair.
  • JSON support different kind of datatypes .
  • JSON is the most popular data representation format
  • JSON is easy to read/wite .
%d bloggers like this: