var str = '{"name":"小明","age":"10","sex":"男"}'
JSON.parse(str)
结果:
Object
- name: "小明"
- age: "10"
- sex: "男"
- __proto__: Object
var str1 = {a:1,b:2}
JSON.stringify(str1)
结果:
{"a":1,"b":2}
var str = '{"name":"小明","age":"10","sex":"男"}'
JSON.parse(str)
结果:
var str1 = {a:1,b:2}
JSON.stringify(str1)
结果:
{"a":1,"b":2}