I have a JSON like this and have to deserialize it:
{
"0": {
"foo_id":"xyz",
"bar_id":"abc",
"book": {
"0": {
"title":"hello",
"author":"person_x"
},
"1": {
"title":"hi",
"author":"person_y"
}
},
"1": {
"foo_id":"xyz",
"bar_id":"abc",
"book": {
"0": {
"title":"hello",
"author":"person_a"
},
"1": {
"title":"bye",
"author":"person_b"
}
},
"random":"string",
"other":"thing"
}
Similar to this question, except the answer given doesn't work, because I don't have the luxury of creating a class like this
public class RootObject
{
public Dictionary<string, Object> Objects {get; set;}
}
If I do than the Objects field is null after deserialization.
Both the root object and book object are dynamic.
Any other approaches would be appreciated, Thanks in advance.