I’m trying to deserialize a JSON string with the following syntax into C# classes, but I’m sort of puzzled on how to handle the dynamic nature of the “parent” object:
{"1":[{"id":"12139811","num":"37805729","date":"2012-01-30"},{"id":"12139812","num":"36911026","date":"2012-01-30"}],"2":[{"id":"12158366","num":"17582898","date":"2012-01-30"},{"id":"12207165","num":"38493538","date":"2012-01-30"}]}
Any help on what the classes should look like will be appreciated.
(Preferably the syntax to Deserialize would be something like
var objects = JsonConvert.DeserializeObject<List<MyObject>>(jsonString);
I think is beacuse your Json star with and identifier “1” instead of the array…
so you could try this