json字符串与 js对象互相转换 var a = {a:1, b:2}; console.log(JSON.stringify(a)); //输出 {"a":1,"b":2} console.log(a.a); //输出 1