1 回答
TA贡献1851条经验 获得超5个赞
建议在使用之前对其进行“反序列化”。由于您的示例看起来像 json,因此您可以添加对 nuget 包NewtonSoft.Json的引用并像这样反序列化:
string json = "[['20190717','7347.00','7291.00','6929.00','7498.00','131','212761','1563195158.00'],['20190716','7291.00','7584.00','7205.00','7800.00','205','786281','5732513136.00'],['20190715','7584.00','7561.00','7262.00','7911.00','201','957135','7258611941.00'],['20190714','7561.00','7796.00','7407.00','7909.00','411','1715426','12970206490.00'],['20190713','7796.00','7428.00','7602.00','7799.00','468','2622089','20442582710.00'],['20190710','7428.00','7140.00','7070.00','7497.00','250','947330','7037099454.00'],['20190709','7140.00','7442.00','7070.00','7449.00','219','665235','4749481884.00'],['20190708','7442.00','7164.00','7300.00','7522.00','276','1171931','8721432059.00'],['20190707','7164.00','6882.00','6540.00','7226.00','324','1125954','8066782953.00']]";
List<List<string>> deserializedList = JsonConvert.DeserializeObject<List<List<string>>>(json);
foreach (List<string> innerList in deserializedList)
{
foreach (string item in innerList)
{
Console.WriteLine(item);
}
}
- 1 回答
- 0 关注
- 94 浏览
添加回答
举报