Profile Picture
IT Made Easy
The site provides some rough IT Notes that make your life easier. The site currently has notes on HTML, CSS, Regex, OOPS, JS, JQuery, PHP, Java, ASP.NET, C#, Database, Linux, URL Rewrite, SEO, Project Management and Hosting. Please do share this site if you like.

JSON

Next
Next
  • the object literal notation of JavaScript

var myJSONObject = {key1: value1, key2: value2, key3:

[{key4: value4, key5: value5},

{key4: value6, key5: value7},

{key4: value8, key5: value9},

]};

myJSONObject.key3 [0].key5               //value5


var myObject = eval('(' + myJSONtext + ')');


var myObject = JSON.parse(myJSONtext, reviver);


JSON versus Eval

  • security issues
  • faster

var myJSONText = JSON.stringify(myObject, replacer);

  • JSON does not support cyclic data structures   

typeof value                     //To get typeof



IT Notes

by VinodSebastian



IT Downloads


Catalogue