標籤:des blog os io for 2014 ar div
{"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"; }