I've been stuck with this issue for a couple of days and found a work around to my problem...
Attempting to deserialize a generic class where T is a dictionary<string, List> was trying to map the List as List
Changing lines 835 and 836 of JSON.cs (inside the CreateStringKeyDictionary method) to the code below fixed the issue but probably not the most elegant of fixes and probably not the most ideal place to put the change.
else if (values.Value is IList) { var t = t2.GetGenericArguments()[0]; val = CreateGenericList((List<object>)values.Value, t2, t, globalTypes); }
The problem was that the collection is created from t2 but t1 is typeof(System.String), when it needed to be the generic arg of t2 (the IList)
Hey guys,
I've been stuck with this issue for a couple of days and found a work around to my problem...
Attempting to deserialize a generic class where T is a dictionary<string, List> was trying to map the List as List
Changing lines 835 and 836 of JSON.cs (inside the CreateStringKeyDictionary method) to the code below fixed the issue but probably not the most elegant of fixes and probably not the most ideal place to put the change.
else if (values.Value is IList) { var t = t2.GetGenericArguments()[0]; val = CreateGenericList((List<object>)values.Value, t2, t, globalTypes); }
The problem was that the collection is created from t2 but t1 is typeof(System.String), when it needed to be the generic arg of t2 (the IList)