使用参考代码:
<script src="json/json2.js"></script>
<script type="text/javascript">
var str2 = { "name": "cxh", "sex": "man" };
var str1 = '{ "name": "cxh", "sex": "man" }';
var obj=JSON.parse(str1);//字符串转json
str1=JSON.stringify(obj);//json转字符串</script>
json使用的方式,可以参考博客:
http://www.cnblogs.com/gaojun/p/3394274.html
http://www.cnblogs.com/worfdream/articles/1956449.html