Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialization fails for Popular Persons data #432

Open
dpjha84 opened this issue Mar 12, 2023 · 0 comments
Open

Deserialization fails for Popular Persons data #432

dpjha84 opened this issue Mar 12, 2023 · 0 comments

Comments

@dpjha84
Copy link

dpjha84 commented Mar 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant