var str = '{ "name": "cxh", "sex": "man" }'; //JSON字符串:var obj = JSON.parse(str);; //由JSON字符串转换为JSON对象console.log(obj)var str2 = { "name": "cxh", "sex": "man" }; //JSON对象var last=JSON.stringify(obj); //将JSON对象转化为JSON字符console.log(last);