The conversion between JS JSON object and string

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

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) ;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

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