I\'m having a problem with JSON Deserialization involving an array of polymorphic objects. I\'ve tried the solutions for serialization documented here and here which work great
You have not added any settings upon deserialization. You need to apply settings with TypeNameHandling
set to Object
or All
.
Like this:
JsonConvert.DeserializeObject(
returnedStringFromClient,
typeof(Scoresheet),
new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.Objects
});
Documentation: TypeNameHandling setting