js对象Json数据互转
原文地址:https://zhidao.baidu.com/question/750266190766969252.html
<script>
var obj = {
a : 'A',
b : 'B',
c : 'C'
};
var json = JSON.stringify(obj);
console.log(json);
console.log(typeof json);
console.log('--------------------------');
var obj2 = JSON.parse(json);
console.log(obj2);
console.log(typeof obj2);
</script>


浙公网安备 33010602011771号