You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a class that contains a HashSet in it. The output looks perfect and contains the string entries as expected. Deserializing that file back into a class fails with an invalid cast, approximately here in JSON.cs (776):
if (pi.IsGenericType && pi.IsValueType == false && v is List<object>)
oset = CreateGenericList((List<object>)v, pi.pt, pi.bt, globaltypes);
No specific type seems to be stored in the $types array. Here's an example, where bseos is a HashSet:
I have a class that contains a HashSet in it. The output looks perfect and contains the string entries as expected. Deserializing that file back into a class fails with an invalid cast, approximately here in JSON.cs (776):
No specific type seems to be stored in the $types array. Here's an example, where bseos is a HashSet:
I can convert this to a List for serialization purposes in my case, but it would be worth supporting the correct generic collection.
Thanks!
The text was updated successfully, but these errors were encountered: