• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

c#读取快递100查询返回的JSON信息

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

{"message":"ok","nu":"1105016801203","companytype":"ems","ischeck":"1","com":"ems","updatetime":"2014-08-01 10:17:31","status":"200","condition":"F00","codenumber":"1105016801203","data":[{"time":"2014-07-30 16:47:00","location":"","context":"赤峰市邮政速递物流分公司新华路揽投部 妥投 本人收签收","ftime":"2014-07-30 16:47:00"},{"time":"2014-07-30 15:18:00","location":"","context":"赤峰市邮政速递物流分公司新华路揽投部 安排投递","ftime":"2014-07-30 15:18:00"},{"time":"2014-07-30 15:09:30","location":"","context":"赤峰市邮政速递物流分公司新华路揽投部 到达处理中心,来自赤峰市","ftime":"2014-07-30 15:09:30"},{"time":"2014-07-30 12:03:42","location":"","context":"赤峰市 离开处理中心,发往赤峰市邮政速递物流分公司新华路揽投部","ftime":"2014-07-30 12:03:42"},{"time":"2014-07-30 11:23:49","location":"","context":"赤峰市 到达处理中心,来自上海市","ftime":"2014-07-30 11:23:49"},{"time":"2014-07-27 23:37:00","location":"","context":"上海市 离开处理中心,发往赤峰市","ftime":"2014-07-27 23:37:00"},{"time":"2014-07-27 15:46:16","location":"","context":"上海市邮政速递物流有限公司北临空揽投部 离开处理中心,发往上海市","ftime":"2014-07-27 15:46:16"},{"time":"2014-07-27 14:27:00","location":"","context":"上海市邮政速递物流有限公司北临空揽投部 收寄","ftime":"2014-07-27 14:27:00"}],"state":"3"}

 

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

 

            JObject jos = (JObject)JsonConvert.DeserializeObject(textBox1.Text);
            string str = jos["data"].ToString();
            JArray ja = (JArray)JsonConvert.DeserializeObject(str);
            foreach (JObject o in ja)
            {
                textBox2.Text += o["context"] + "\r\n";
            }

  

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
关于C#调用API的理解(汇多考勤机HD4K)发布时间:2022-07-10
下一篇:
C#检查字符串,防SQL注入攻击发布时间:2022-07-10
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap