The Json response is like this:
[
[
1597276800000,
"16.46340000",
"18.34880000",
"15.91750000",
"17.18830000",
"30941693.96000000",
1597363199999,
"527277033.75007300",
681520,
"15434492.74000000",
"263241680.21583200",
"0"
],
[
1597363200000,
"17.17280000",
"17.59980000",
"16.30000000",
"16.86580000",
"11130678.41000000",
1597449599999,
"188347963.49490200",
244865,
"5421845.98000000",
"91775690.92871400",
"0"
]
]
I know the labels of these properties but they are not in the json document.
This is how the response looks in the json viewer in vs.
when I convert with json2csharp.com I get these:
public class Root {
public List<List<object>> MyArray { get; set; }
}
and
Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse);
the compiler complains:
because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
A list of list or an array of list should work but I keep getting the same error message.
Any ideas?
Thanks