你的Json都不完整,看不清结构是什么,可以发个全的,其实很简单,就是定义一个同样的对象就行了,
直接可以解析出来,这个主要是对像建立麻烦。
我正在开发根据Json生成对象的工具。相信会解决这类问题。
帮你格式化一下,先补充完整一下吧
[C#] 纯文本查看 复制代码 g_config.RequstPrior='success';g_config.DynamicStock={ "virtQuantity": "877911",
"holdQuantity": "0",
"stock": "877911"
};g_config.PromoData={
"def": [
{
type: "最后1小时",
price: "20.00",
limitTime: "",
channelkey: "",
add: "",
gift: "",
cart: "true",
amountRestriction: "",
stepPrice: [
],
isStart: "false"
}
]
};g_config.PointData=[
"淘金币最高可抵商品价<em class='tb-h'> 1%</em>"
];g_config.PointDataNew={
"-1": "<em class='tb_red'><strong>20</strong>淘金币</em><em class='tb_dashes_box'> 抵¥0.20</em> <em class='tb_tjb_price'>¥19.80</em>",
"-2": "淘金币最高可抵商品价<em class='tb-h'> 1%</em>"
};g_config.vdata.asyncViewer={
"viewer": {
"admin": false,
"lgin": true,
"cc": false,
"buyerId": 1813230032,
"cartDomain": "cart.taobao.com",
"buyDomain": "buy.taobao.com",
"bs": "",
"tkn": "4Jl1VLYKFNy7s6"
}
};g_config.DeliveryFee={
"data": {
"areaId": 440103,
"areaName": "广东广州荔湾区",
"sendCity": "广东广州",
"serviceInfo": {
"list": [
{
"id": "100_-4",
"info": "快递 免运费",
"isDefault": true,
"markInfo": "卖家承诺16小时内发货"
}
]
}
},
"dataUrl": "http://detailskip.taobao.com/json/deliveryFee.htm",
"message": "ok",
"success": true
};g_config.ContractList=[
{
"id": 0,
"img": "http://gtms01.alicdn.com/tps/i1/T1EQA5FpVgXXceOP_X-16-16.jpg",
"name": "7天无理由",
"new": false,
"serviceId": "7d",
"title": "7天无理由",
"url": "http://xiaobao.taobao.com/contract/item_service.htm?scm=1010.100.100.1&contract_id=7d&item_id=43342454277"
}
];g_config.QrcodeImgUrl='http: //gqrcode.alicdn.com/img?type=ci&item_id=43342454277&isShow=0&v=1';g_config.Price="158.00";g_config.Oneclick=false;g_config.sellerDetail={
"show": false
};g_config.tryThenBuy={
"errorCode": -5,
"errorMsg": "非法商品",
"success": false
};
|