Hello I am in desperate need of some help. I have a json file, with an array of json objects. I cannot figure out how to deserialize it into a list of this object.
Try using Newtonsoft.Json library.
Add this https://www.nuget.org/packages/Newtonsoft.Json/7.0.1 on your project.
This is the link for my solution: https://dotnetfiddle.net/eqJXTy
And then:
List> obj =
Newtonsoft.Json.JsonConvert.
DeserializeObject>>(jsonString);
foreach(Dictionary lst in obj)
{
Console.WriteLine("--NewObject--");
Console.WriteLine(string.Format("Rk: {0} Gcar: {1}", lst["Rk"], lst["Gcar"]));
foreach(KeyValuePair item in lst)
{
Console.WriteLine(string.Format("Key: {0} Value: {1}", item.Key, item.Value));
}
}
Happy to help you!