码迷,mamicode.com
首页 > Web开发 > 详细

Newtonsoft.Json

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

标签:newton   des   roo   entity   object   log   toc   sharp   实体   

在线生成实体: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

标签:newton   des   roo   entity   object   log   toc   sharp   实体   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!