美文网首页
ashx一般处理程序写接口

ashx一般处理程序写接口

作者: 哆啦在这A梦在哪 | 来源:发表于2018-09-28 14:13 被阅读155次

json的处理:
string json = @"[{'phantom':true,'id':'20130717001','data':{'MID':1019,'Name':'aaccccc','Des':'cc','Disable':'启用','Remark':'cccc'}}]";
List<Info> jobInfoList = JsonConvert.DeserializeObject<List<Info>>(json);

        foreach (Info jobInfo in jobInfoList)
        {
            Console.WriteLine("UserName:" + jobInfo.id);
        }
    }
}

public class Info
{
    public string phantom { get; set; }
    public string id { get; set; }
    public data data { get; set; }
}

public class data
{
    public int MID { get; set; }
    public string Name { get; set; }
    public string Des { get; set; }
    public string Disable { get; set; }
    public string Remark { get; set; }
}

相关文章

网友评论

      本文标题:ashx一般处理程序写接口

      本文链接:https://www.haomeiwen.com/subject/iecpoftx.html