JSON.parse()是从一字符串数据解析出json对象。
JSON.stringify()是把一对象中解析出字符串。
> var testStr = '{"name": "willschang", "age":"32"}'
undefined
> testStr
'{"name": "willschang", "age":"32"}'
> jsonStr = JSON.parse(testStr)
{ name: 'willschang', age: '32' }
> var testStr1 = {name:'willschang', age:32}
undefined
> testStr1
{ name: 'willschang', age: 32 }
> JSON.stringify(testStr1)
'{"name":"willschang","age":32}'
>