Please indicate the source of the original reprint: http://agilestyle.iteye.com/blog/2352232
JSON.parse()
Demo
var str = '{"username":"nodejs", "password":"23"}'; console.log(JSON.parse(str));
Console Output
JSON.stringify()
Demo
var str = {a: 1, b: 2, c: "test"}; console.log(JSON.stringify(str));
Console Output