parse 从字符串解析出json对象:
var data = ‘{"a":1,"b":2}‘;
JSON.parse(data);
返回Object
a:1
b:2
_proto_:Object
stringify从json对象解析出字符串:
var data = {a:1,b:2}
JSON.stringify(data)
返回:
‘{"a":"1","b":"2"}‘
2022-10-10 17:41:26
parse 从字符串解析出json对象:
var data = ‘{"a":1,"b":2}‘;
JSON.parse(data);
返回Object
a:1
b:2
_proto_:Object
stringify从json对象解析出字符串:
var data = {a:1,b:2}
JSON.stringify(data)
返回:
‘{"a":"1","b":"2"}‘