日期:2014-05-17  浏览次数:20611 次

如何查表后生成json数据 求解答
需要生成如下的json 

?{
    "response": "cart",
  "cart":{
listmap        "cartitem": [                 //购物车项
        :{ ---product  
map-->                "product":{
                    "id":"1200001",              //商品ID
                    "name": "雅培金装",          //商品名称
                    "pic":"",                    //商品图片URL
                    "price":"89",                 //商品售价
                    "number": 0,                //商品库存数量,0为缺货或下架
                    "uplimit":"10"               //商品购买数量上限
listmap    ------->  "product_property":[          //属性
                           {
                               "key": "颜色",
                               "value": "红色",
                            },
                            {
                               "key": "大小",
                               "value": "M",
                                }
                        ],
                    "isgif