Sunday, October 22, 2017

JSON

In addition to using "new" keyword, JavaScript Object can also be created directly from literal values.  For example,

Obj1 = {“member1” : “this is member 1”, “member2” : “2”, member 3 : 3, member4 : Obj2};

Or using array notation:

Obj1 = [“this is member 1”, “member2”, 3, Obj2];

JSON is derived from the literal form of the Object in Javascript.  The possible JSON value can be a string, number, object, array, true, false and null.

No comments: