首页 > Web开发 > 详细

Newtonsoft.Json

时间:2016-10-28 07:41:31      阅读:195      评论:0      收藏:0      [点我收藏+]

在线生成实体:http://tool.chinaz.com/tools/json2entity.aspx

  
          RootObject ac = new RootObject();
            ac = JsonConvert.DeserializeObject<RootObject>(sb.ToString());
            sb2.Append(ac.status);
            sb2.Append("<br>");
            sb2.Append(ac.lastResult.message);
            Context.Response.Write(sb2.ToString());








  public class RootObject
    {
        public string status { get; set; }
        public string billstatus { get; set; }
        public string message { get; set; }
        public string autoCheck { get; set; }
        public string comOld { get; set; }
        public string comNew { get; set; }
        public LastResult lastResult { get; set; }
    }

    public class LastResult
    {
        public string message { get; set; }
        public string nu { get; set; }
        public string ischeck { get; set; }
        public string condition { get; set; }
        public string com { get; set; }
        public string status { get; set; }
        public string state { get; set; }
        public List<Data> data { get; set; }
    }

    public class Data
    {
        public string time { get; set; }
        public string ftime { get; set; }
        public string context { get; set; }
    }

 

Newtonsoft.Json

原文:http://www.cnblogs.com/LCX/p/6006341.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!