I have a class looking like this:
class MyClass {
public int Id;
public Dictionary<int, MyClass[]> ChildValues;
}
when I try to deserialize this class using Json.NET:
MyClass x = return JsonConvert.DeserializeObject<MyClass>(s);
I receive the error Expected a JsonObjectContract or JsonDictionaryContract for type 'System.Collections.Generic.Dictionary`2[System.Int32,MyClass[]]', got 'Newtonsoft.Json.Serialization.JsonDictionaryContract'.
What does this error message mean and how can I resolve it?