Unable to successfully deserialize the following json object into type ‘System.Collections.Generic.List`1[System.
When we tried to deserialize a json object into a List, we were unsuccessful in serializing it. This was due to an error during serialization of a type System.Collections.Generic.List1. This is a list of type System.Collections.Generic.DictionaryEntry where the key and the value are of type string and the list of entries is of type System.Collections.Generic.List.
Can’t successfully deserialize a list of List1 and List. We were unable to deserialize the list of List1, List, List, List, etc.
In our previous post we mentioned that it’s impossible to deserialize a list of type List1 or List. This is because a list of type List1 is not serializable. However, a list of type List is serializable because it’s not a list of lists but a list of lists. A list of type List1 can be deserialized, but you can’t deserialize a list of type List because it’s a collection of lists.
This is a good one, but it’s a little confusing. List1 has a property called Value; List1 has a property called Value, and it’s not part of the list of lists. List1 has a property called Value, Value is not part of the list of lists, and Value is not a part of the list of lists. In our case, the properties of List are not serializable, and it’s not serializable.
It’s a little confusing, cause in a list of lists, Value is not a part of the list of lists.
There are a lot of things that are not serializable. So when someone tries to deserialize a list (in our case a list of lists) into something that is not serializable, they end up with a list of lists that isn’t even a list of lists. This can be really confusing.
So you can’t deserialize a list of lists into anything that isn’t a list, which is pretty much the definition of not a list of lists.
The json parser in our case is not able to deserialize a json string or an object that is not a list. So if you have a string that has all these objects inside it, you can’t deserialize it into a object that isnt a list. And for objects that arent lists, you cant deserialize it into a list. These are the two things that make our json parser fail.
The only way to get around this is to use a very specific parser. For example, we use the json parser from json-simple and it works just fine.