The conversion between JS JSON object and string

String object (jsonStr represents the JSON string) :

var obj = eval(jsonStr); 
var obj = jsonStr.parseJSON(); 
var obj = JSON.parse(jsonStr),  

The JSON object to a string (obj JSON) :

var str = obj.toJSONString(); 
var str = JSON.stringify(obj) ;

Posted by Archibald at December 20, 2013 - 9:22 PM