//测试物流json
string jsonStr ="{"Count":4,"Data":[{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701160","OrderCode":"","Reason":"","ShipperCode":"HHTT","State":"2","Success":true,"Traces":[{"AcceptStation":"深圳市横岗速递营销部已收件,(揽投员姓名:钟某某;联系电话:18000000000)","AcceptTime":"2017-01-16 14:35:34"},{"AcceptStation":"离开深圳市 发往广州市","AcceptTime":"2017-01-16 18:35:34"},{"AcceptStation":"呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安某;联系电话:18800000000)","AcceptTime":"2017-01-17 11:35:34"}]},{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701161","OrderCode":"","Reason":"","ShipperCode":"ZJS","State":"0","Success":true,"Traces":[]},{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701162","OrderCode":"","Reason":"","ShipperCode":"SF","State":"2","Success":true,"Traces":[{"AcceptStation":"深圳市横岗速递营销部已收件,(揽投员姓名:钟某某;联系电话:18000000000)","AcceptTime":"2017-01-16 14:35:34"},{"AcceptStation":"离开深圳市 发往广州市","AcceptTime":"2017-01-16 18:35:34"},{"AcceptStation":"呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安某;联系电话:18800000000)","AcceptTime":"2017-01-17 11:35:34"}]},{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701163","OrderCode":"","Reason":"","ShipperCode":"ZJS","State":"3","Success":true,"Traces":[{"AcceptStation":"深圳市横岗速递营销部已收件,(揽投员姓名:钟某某;联系电话:18000000000)","AcceptTime":"2017-01-16 14:35:34"},{"AcceptStation":"离开深圳市 发往广州市","AcceptTime":"2017-01-16 18:35:34"},{"AcceptStation":"呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安某;联系电话:18800000000)","AcceptTime":"2017-01-17 11:35:34"},{"AcceptStation":"快件已被签收,签收人:本人","AcceptTime":"2017-01-17 12:35:34"}]}],"EBusinessID":"1273758","PushTime":"2017-01-17 14:35:34"}";
// 解析推送
JObject jo = (JObject)JsonConvert.DeserializeObject(json);
JArray dataJa = (JArray)jo["Data"];
// 便利 Data Json 数组
foreach (JObject item in dataJa)
{
// 获取更新的物流明细内容
JArray jaTraces = (JArray)item["Traces"];
// 遍历推送明细数据
foreach (JObject data in jaTraces)
{
string AcceptStation= data["AcceptStation"].ToString();
string AcceptTime = data["AcceptTime"].ToString();
}
}
string jsonStr ="{"Count":4,"Data":[{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701160","OrderCode":"","Reason":"","ShipperCode":"HHTT","State":"2","Success":true,"Traces":[{"AcceptStation":"深圳市横岗速递营销部已收件,(揽投员姓名:钟某某;联系电话:18000000000)","AcceptTime":"2017-01-16 14:35:34"},{"AcceptStation":"离开深圳市 发往广州市","AcceptTime":"2017-01-16 18:35:34"},{"AcceptStation":"呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安某;联系电话:18800000000)","AcceptTime":"2017-01-17 11:35:34"}]},{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701161","OrderCode":"","Reason":"","ShipperCode":"ZJS","State":"0","Success":true,"Traces":[]},{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701162","OrderCode":"","Reason":"","ShipperCode":"SF","State":"2","Success":true,"Traces":[{"AcceptStation":"深圳市横岗速递营销部已收件,(揽投员姓名:钟某某;联系电话:18000000000)","AcceptTime":"2017-01-16 14:35:34"},{"AcceptStation":"离开深圳市 发往广州市","AcceptTime":"2017-01-16 18:35:34"},{"AcceptStation":"呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安某;联系电话:18800000000)","AcceptTime":"2017-01-17 11:35:34"}]},{"CallBack":"","EBusinessID":"1273758","LogisticCode":"00000000201701163","OrderCode":"","Reason":"","ShipperCode":"ZJS","State":"3","Success":true,"Traces":[{"AcceptStation":"深圳市横岗速递营销部已收件,(揽投员姓名:钟某某;联系电话:18000000000)","AcceptTime":"2017-01-16 14:35:34"},{"AcceptStation":"离开深圳市 发往广州市","AcceptTime":"2017-01-16 18:35:34"},{"AcceptStation":"呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安某;联系电话:18800000000)","AcceptTime":"2017-01-17 11:35:34"},{"AcceptStation":"快件已被签收,签收人:本人","AcceptTime":"2017-01-17 12:35:34"}]}],"EBusinessID":"1273758","PushTime":"2017-01-17 14:35:34"}";
// 解析推送
JObject jo = (JObject)JsonConvert.DeserializeObject(json);
JArray dataJa = (JArray)jo["Data"];
// 便利 Data Json 数组
foreach (JObject item in dataJa)
{
// 获取更新的物流明细内容
JArray jaTraces = (JArray)item["Traces"];
// 遍历推送明细数据
foreach (JObject data in jaTraces)
{
string AcceptStation= data["AcceptStation"].ToString();
string AcceptTime = data["AcceptTime"].ToString();
}
}