C#,没有key只有value的JSON串,如何转换为list<T>
Infor:{"tradeCode":"5040010","mess":"成功","data":[["801","玉璜","2114-10-01","订单","5.29"...
Infor:{"tradeCode":"5040010","mess":"成功","data":[["801","玉璜","2114-10-01","订单","5.29","3.91","100%","100%","0.15%","0.0%","香港","香
港","1.00","1","0","0","0.00","0.0","0.0","0.0"],["802","双龙玉璜","2114-10-01","订单","5.17","3.82","100%","100%","0.15%","0.0%","香港","香
港","1.00","1","0","0","0.00","0.0","0.0","0.0"],["803","龙凤玉佩","2114-10-14","订单","2.32","1.72","100%","100%","0.3%","0.0%","香港","香
港","0.01","1","0","0","0.00","0.0","0.0","0.0"],["805","古玉屏风","2114-11-11","订单","1.97","1.45","100%","100%","0.3%","0.0%","香港","香
港","0.01","1","0","0","0.00","0.0","0.0","0.0"],["806","古玉玉龙","2114-12-18","订单","2.64","1.95","100%","100%","0.3%","0.0%","香港","香
港","0.01","1","0","0","0.00","0.0","0.0","0.0"]],"sid":"M74W4OIDTICHQ9AUE3NLRVGG90KUHFHT","ver":"1.0.0","zip":"n","charset":"UTF-
8","encrypt":"0","cryptKey":null,"digest":"","packetNo":1,"packetCounts":1,"returned":false} 展开
港","1.00","1","0","0","0.00","0.0","0.0","0.0"],["802","双龙玉璜","2114-10-01","订单","5.17","3.82","100%","100%","0.15%","0.0%","香港","香
港","1.00","1","0","0","0.00","0.0","0.0","0.0"],["803","龙凤玉佩","2114-10-14","订单","2.32","1.72","100%","100%","0.3%","0.0%","香港","香
港","0.01","1","0","0","0.00","0.0","0.0","0.0"],["805","古玉屏风","2114-11-11","订单","1.97","1.45","100%","100%","0.3%","0.0%","香港","香
港","0.01","1","0","0","0.00","0.0","0.0","0.0"],["806","古玉玉龙","2114-12-18","订单","2.64","1.95","100%","100%","0.3%","0.0%","香港","香
港","0.01","1","0","0","0.00","0.0","0.0","0.0"]],"sid":"M74W4OIDTICHQ9AUE3NLRVGG90KUHFHT","ver":"1.0.0","zip":"n","charset":"UTF-
8","encrypt":"0","cryptKey":null,"digest":"","packetNo":1,"packetCounts":1,"returned":false} 展开
2个回答
展开全部
public class Model
{
public int Count { set; get; }
public List<Data> Data { set; get; }
}
public class Data
{
public string carLengthWin { set; get; }
public string carAxleRequire { set; get; }
public string tradeTelephoneNumber { set; get; }
}
然后使用JavaScriptSerializer的Deserialize方法反序列化,参数是json
{
public int Count { set; get; }
public List<Data> Data { set; get; }
}
public class Data
{
public string carLengthWin { set; get; }
public string carAxleRequire { set; get; }
public string tradeTelephoneNumber { set; get; }
}
然后使用JavaScriptSerializer的Deserialize方法反序列化,参数是json
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
怎么没有key,都有key啊,只是其中的data项是一个二维数组罢了
追问
[]里面的JSON没有key只有value
追答
“[]”在js里代表的是数组啊!肯定只有value哦
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询