C # Read the JSON information returned by the Express 100 query

Source: Internet
Author: User

{"Message": "OK", "Nu": "1105016801203", "Companytype": "EMS", "Ischeck": "1", "com": "EMS", "UpdateTime": "2014-08-01 10:17:31 "," status ":" $ "," condition ":" F00 "," Codenumber ":" 1105016801203 "," data ": [{" Time ":" 2014-07-30 16:47:00 "," Location ":", "context": "Chifeng Postal Express Logistics Branch Xinhualu Range Investment Department duly cast my receipt and sign", "Ftime": "2014-07-30 16:47:00"},{"Time": "2014-07-30 15:18:00", "Location": "," "Context": "Chifeng Postal Courier Logistics Branch Xinhualu Range Investment Department arrangement delivery", "Ftime": "2014-07-30 15:18:00"},{"Time": "2014-07-30 15:09:30", " Location ":", "context": "Chifeng Postal Courier Logistics Branch Xinhualu Range Investment department to reach the processing center, from Chifeng", "Ftime": "2014-07-30 15:09:30"},{"Time": "2014-07-30 12:03:42 "," Location ":", "context": "Chifeng leave processing center, send to Chifeng Postal Express Logistics Branch Xinhualu Range Investment Department", "Ftime": "2014-07-30 12:03:42"},{"Time": " 2014-07-30 11:23:49 "," Location ":", "context": "Chifeng arrival processing center, from Shanghai", "Ftime": "2014-07-30 11:23:49"},{"Time": " 2014-07-27 23:37:00 "," Location ":", "context": "Shanghai leave processing center, send to Chifeng", "Ftime": "2014-07-27 23:37:00"},{"Time": " 2014-07-27 15:46:16 "," Location ":" "," context ":" Shanghai Post Express Logistics Co., Ltd. north of the Air Range Investment department left the processing center, sent to Shanghai "," Ftime ":" 2014-07-27 15:46:16 "},{" Time ":" 2014-07-2714:27:00 "," Location ":" "," context ":" Shanghai Post Express Logistics Co., Ltd. north of the empty Range Investment department "," 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";            }

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.