This sample converts LINQ to JSON objects to .NET types using Argon.JToken.ToObject<T>
.
var json = """
{
'd': [
{
'Name': 'John Smith'
},
{
'Name': 'Mike Smith'
}
]
}
""";
var o = JObject.Parse(json);
var a = (JArray) o["d"];
var person = a.ToObject<IList<Person>>();
Console.WriteLine(person[0].Name);
// John Smith
Console.WriteLine(person[1].Name);
// Mike Smith