Newtonsoft.Json

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

 

posted @ 2016-10-28 05:11  大力  阅读(339)  评论(0编辑  收藏  举报