关键在这里点edit将下面的内容复制到文本框内,即可生成的代码即json格式的
{"${member.name()}":"${member.value}", "${otherMembers}"}
若对象中引入其他对象则生成的json格式是不正确的如:
{
"id": "9",
"img": "1363161532531.JPG",
此处的引号应去掉 “user”:{
"user": "{
"id": "1",
"name": "t",
"password": "t",
"tel": "",
"email": ""
}",
对应的这里也应该改掉 },
"address": "地址",
"lat": "31.859408",
"lon": "117.316827",
"unitprice": "0.0",
"area": "0.0",
"price": "0.0",
"descp": "信息",
"state": "1",
"type": "1",
"date": "2013-03-13 15:58:53"
}e": "1",
"img": "1363162505296.JPG",
"type": "1",
"date": "2013-03-13 16:15:05",
"user": {
"id": "1",
"email": "",
"name": "t",
"tel": "",
"password": "t"
},
"lat": "31.857139"
},
{
"id": "11",
"descp": "信息",
"unitprice": "0.0",
"lon": "117.319558",
"price": "0.0",
"area": "0.0",
"address": "地址",
"dis": 13975.950445244007,
"state": "1",
"img": "1363162523718.JPG",
"type": "1",
"date": "2013-03-13 16:15:23",
"user": {
"id": "1",
"email": "",
"name": "t",
"tel": "",
"password": "t"
},
"lat": "31.857936"
}
],
"state": 1
}