My JSON feed has nested objects like this:
{
\"id\": 1765116,
\"name\": \"StrozeR\",
\"birth\": \"2009-08-12\",
\"avatar\": \"http:\\/\\/static.erepublik.com
Like the error message says, your rank
property in the .NET class is a List
, but in your JSON it's just a nested object, not an array. Change it to just a Rank
instead of a List
.
Arrays in JSON (or any Javascript, really) are enclosed in []
. The {}
characters specify a single object. The CLR type has to roughly match the JSON type in order to deserialize. Object to object, array to array.