JSON对象和字符串的相互转化
JSON对象转字符串
var a={name:"zhangsan",age:18};
JSON.stringify(a);
字符串转JSON对象
var a="{name:zhangsan,age:18}";
JSON.parse(a);
向JSON对象中添加字段
var a={name:"zhangsan",age:18};
a["sex"]="男";
删除JSON对象的字段
var a={name:"zhangsan",age:18};
delete a.name;