Understanding JSON (JavaScript Object Notation)

JSON or the JavaScript Object Notation, as we know, is one of the highly popular data-interchange format along with XML, YAML, RDF etc. Its popularity is mainly due to its syntactical similarities with the JavaScript and it being human readable. Often, we find it difficult to clearly distinguish between JSON and its JavaScript counterpart – A simple JavaScript Object. In this article, I will try to distinguish the fundamental differences between the two.

Firstly, let me define a simple literal object in JavaScript. It looks like this, in its simplest form:-

var jsObj =

   {  
       "firstName" : "John" ,
       "lastName" : "Michael"
   };

Continue reading

Advertisements