Exception occurs when trying to deserialize using Json.Net [duplicate]
问题 This question already has answers here : Deserializing JSON into one of several C# subclasses (1 answer) Deserializing polymorphic json classes without type information using json.net (5 answers) Closed 5 months ago . I am trying to deserialize the following json using Json.Net into C# classes as defined below. I am having this exception: Newtonsoft.Json.JsonSerializationException: 'Could not create an instance of type Viewer.ShapeDto. Type is an interface or abstract class and cannot be