常用的json数据格式
1. 单实体数据模型
如:{
"userId": "U46554751",
"userName": "张三李四王麻子",
"userPhone": "13030303131",
"userFollow": "86",
"userFuns": "5125",
"userFavorite": "615",
"userEBuy": "103",
"userComment": "999",
"userNews": "3",
"userPoints": "3",
"userOrder": "8",
"userLocation": "5",
"isSeller":"1"
}
2. 简单集合数据模型
如:[{
"commId": "c798615641",
"goodsId": "g76164565",
"goodName": "【护肤彩妆】Biotherm碧欧泉活泉/矿泉",
"userIconUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"userName": "浅川168",
"commTime": "2013-7-8 11:44",
"askBuyPrice": "39",
"adkbuyCount": "10",
"commContent": "小女不才,所知诗词甚少"
},
{
"commId": "c798615641",
"goodsId": "g76164565",
"goodName": "【护肤彩妆】Biotherm碧欧泉活泉/矿泉",
"userIconUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"userName": "浅川168",
"commTime": "2013-7-8 11:44",
"askBuyPrice": "39",
"adkbuyCount": "10",
"commContent": "小女不才,所知诗词甚少"
},
……….
]
3. 单实体嵌套集合数据模型
{
"goodsId": "G136456457",
"takeTime": "下单后72小时",
"goodsImages": [{
"indexId": "A794555464",
"itemtitle": "BB霜控请看过来怎样更好的护肤",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"itemDesc": "BB霜控请看过来怎样更好的护肤",
"itemType": "0"
},
{
"indexId": "A794555464",
"itemtitle": "BB霜控请看过来怎样更好的护肤",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"itemDesc": "BB霜控请看过来怎样更好的护肤",
"itemType": "0"
},
{
"indexId": "A794555464",
"itemtitle": "BB霜控请看过来怎样更好的护肤",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"itemDesc": "BB霜控请看过来怎样更好的护肤",
"itemType": "0"
}]
}
4. 集合嵌套集合数据模型
[
{
"itemId":"C46554751",
"itemName":"设计师",
"itemSubhead":"创意/趣味/独家",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"itemUrl": [
{
"itemSubhead":"创意",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”
},
{
"itemSubhead":"趣味",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”
}
]
},
{
"itemId":"C46554751",
"itemName":"设计师",
"itemSubhead":"创意/趣味/独家",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”,
"itemUrl": [
{
"itemSubhead":"创意 ",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”
},
{
"itemSubhead":"趣味",
"itemUrl": “http://tb.himg.baidu.com/46541546476.jpg”
}
]
}
]
5. 实体—实体数据模型
{
"itemId": "E48651365465",
"itemName": "一级",
"childBean": {
"childId": "C4651561456456",
"childName": "二级"
}
}
6. 集合—实体数据模型
[
{
"itemId": "E48651365465",
"itemName": "一级",
"childBean": {
"childId": "C4651561456456",
"childName": "二级"
}
},
{
"itemId": "E48651365465",
"itemName": "一级",
"childBean": {
"childId": "C4651561456456",
"childName": "二级"
}
},
{
"itemId": "E48651365465",
"itemName": "一级",
"childBean": {
"childId": "C4651561456456",
"childName": "二级"
}
}
]
7. 其它数据模型
{
"itemId": "456151531",
"categoryList": [
{
"itemId": "E48651365465",
"itemName": "一级",
"childBean": {
"childId": "C4651561456456",
"childName": "二级"
}
},
{
"itemId": "E48651365465",
"itemName": "一级",
"childBean": {
"childId": "C4651561456456",
"childName": "二级"
}
}
],
"categoryBean": {
"itemId": "E48651365465",
"itemName": "一级",
"itemDesc": ""
}
}