[
{
"A" : "1",
"B" : "2",
"C" : "3",
"D" : "4",
"E" : "5",
"F" : "6"
},
{
"A" : "1",
"B" : "2",
"C" : "3",
"D" : "4",
"E" : "5",
"F" : "6"
}
]
I'd like to parse JSON as above.
private void ParseJson(String json)
{
// // JObject obj = JObject.Parse(json);
JArray array =JArray.Parse(json);
foreach (JObject itemObj in array.Children<JObject>())
{
JsonData DownLoadData = new JsonData();
DownLoadData.A = itemObj["A"].ToString();
DownLoadData.B = itemObj["B"].ToString();
DownLoadData.C = itemObj["C"].ToString();
DownLoadData.D = itemObj["D"].ToString();
JsonDatas.Add(DownLoadData);
}
}
There is an error when coding to . Is there a way?
c#
The data is wrong, so the parsing is wrong. The content of the sauce is correct.
© 2024 OneMinuteCode. All rights reserved.