What is JSON

JSON (JavaScript Object Notation) is a lightweight information trade position. It is simple for people to read and write. It is simple for machines to parse and create. It depends on a subset of the JavaScript Programming Language, Standard ECMA-262 third Edition - December 1999.

JSON is a text configuration that is totally dialect free yet utilizes traditions that are commonplace to software engineers of the C-group of dialects, including C, C++, C#, Java, JavaScript, Perl, Python, and numerous others. These properties make JSON a perfect information trade dialect.

  • JSON stands for JavaScript Object Notation.
  • JSON is an open standard data-interchange format.
  • JSON is a lightweight data-interchange format
  • JSON supports array, object, string, number and values.
  • JSON is easy to read and write.
  • JSON is language independent.
  • JSON is "self-describing" and easy to understand
  • JSON supports data structures such as array and objects.
{"employees":[
    {"firstName":"mithilesh", "lastName":"singh"},
    {"firstName":"mithilesh", "lastName":"singh"},
    {"firstName":"rahul", "lastName":"singh"}
]}

The following XML example also defines an employees object with 3 employee records:

 <employees> 
  <employee> 
 <firstName>Mithilesh </firstName> <lastName>Kushwaha</lastName> 
  </employee> 
  <employee> 
  <firstName>Mithilesh</firstName> <lastName>Singh</lastName> 
  </employee> 
 <employee> 
 <firstName>Rahul</firstName> <lastName>Patel</lastName> 
 </employee> 
</employees> 
 

Uses of JSON

It is utilized while composing JavaScript based applications that incorporates program augmentations and sites.

JSON organization is utilized for serializing and transmitting organized information over system association.

It is principally used to transmit information between a server and web applications.

Web administrations and APIs use JSON organization to give open information.

It can be utilized with present day programming dialects.

Why JSON?

For AJAX applications, JSON is speedier and less demanding than XML:

Using XML

  • Bring a XML archive
  • Utilize the XML DOM to circle through the record
  • Extricate values and store in variables

Using JSON

  • Bring a JSON string
  • JSON.Parse the JSON string
  • Characteristics of JSON
  • JSON is anything but difficult to read and write.
  • It is a lightweight content based trade group.
  • JSON is dialect free.
Note:- Child utilizes JavaScript syntax, but the JSON organization is content just, much the same as XML. Content can be perused and utilized as an information design by any programming dialect.