JSON字符串的生成
public class Corporation { public string remark { get; set; } public string version { get; set; } public string @operator { get; set; } } public class TenderDoc { public string tenderdocid { get; set; } public Corporation corporation { get; set; } public string context { get; set; }public string @operator { get; set; } } public class Root { public List<TenderDoc> datas { get; set; } public string flag{ get; set; } } 这样就定义了json的实体类。 Corporation cop = new Corporation(); cop.remark = "remark"; cop.version = "C#"; cop.@operator = "niap"; List<TenderDoc> listtd = new List<TenderDoc>();