http://blog.csdn.net/zhangquanok/article/details/13002771

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

var objP = {};

objP.id = 1;

objP.name = 2;

objP.sex = 32;

JSON.stringify(objP)//序列化

JSON.parse(e); //JSON.parse(e)反序列化