document.writeln(JSON.stringify(person)); //=>{"name":"xiao","age":21}
var xiao = JSON.parse('{"name":"xiao","age":21}');
document.writeln(xiao.name); //=> xiao
Javascript 对象序列化与反序列化
最新推荐文章于 2024-02-02 01:31:32 发布
document.writeln(JSON.stringify(person)); //=>{"name":"xiao","age":21}
var xiao = JSON.parse('{"name":"xiao","age":21}');
document.writeln(xiao.name); //=> xiao