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 get JsonSerializationException exception when I try to deserialize the "Popular Persons" data using newtonsoft.json. Following is the error I get-
Newtonsoft.Json.JsonSerializationException: Could not create an instance of type TMDbLib.Objects.Search.KnownForBase. Type is an interface or abstract class and cannot be instantiated.
Path 'PopularPersons_1.Data.results[0].known_for[0].first_air_date', line 1, position 143.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
I get JsonSerializationException exception when I try to deserialize the "Popular Persons" data using newtonsoft.json. Following is the error I get-
Newtonsoft.Json.JsonSerializationException: Could not create an instance of type TMDbLib.Objects.Search.KnownForBase. Type is an interface or abstract class and cannot be instantiated.
Path 'PopularPersons_1.Data.results[0].known_for[0].first_air_date', line 1, position 143.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Following is the API I call on TMDBLib-
await tmdbClient.GetPersonPopularListAsync(page: 1);
Any pointer to fix this or work around will be highly appreciated. Thanks in advance.
The text was updated successfully, but these errors were encountered: