json对象和json字符串的区别
var person={“name”:”zhangsan”,”sex”:”男”,”age”:”24”}//json对象
var person='{“name”:”zhangsan”,”sex”:”男”,”age”:”24”}';//json字符串
json对象转为json字符串,调⽤stringify⽅法:
var person={"name":"zhangsan","sex":"男","age":"24"};//json对象
var personString = JSON.stringify(person);
alert(personString);