parse用于从一个字符串中解析出json对象;
例子:var str = ‘{"name":"xiaoming","age":"23"}‘
执行:JSON.parse(str)
结果:Object {name: "xiaoming", age: "23"}
注意:单引号写在{}外,每个属性名都必须用双引号,否则会抛出异常。
=======================================
stringify()用于从一个对象解析出字符串;
例子:var a = {a:1,b:2};
执行:JSON.stringify(a);
结果:"{"a":1,"b":2}"
原文:http://www.cnblogs.com/kpengfang/p/5507234.html