-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Enum JsonConverters are not applied #388
Comments
Is there any update acoording this topic? I ran into this problem today. Thank you very much for sharing your project! |
Hi How did you experience the problem? I don't have much time at the moment, so I won't get to fix the converters any time soon. |
I try to serialize the values (e.g. Language or any other enum) for sending it over a rest api. I get the error message The converter specified on 'GoogleApi.Entities.Common.Enums.AddressComponentType' does not derive from JsonConverter or have a public parameterless constructor.. I will try to find the reason for the problem and maybe I can give you some further information or provide a fix to you. |
Try send me the code that gives issues |
I created a new .NET Core API project and added just a minimal API method:
|
But there is no code for GoogleApi... I need to see GoogleApi. So basically your issue has nothing to do with GoogleApi, it's wihtin your code. |
You're right. I just want to return the GoogleAPI model and I know I should provide my own model. But that is a lot of work and I wanted to save myself that. The problem is that I have to change a existing project which uses your GoogleAPI to a server / client architecture because the client will not have access to the internet in the near future. I was able to solve the problem using the following code:
Thank you for your support and sorry for wasting your time. |
The enum converters, e.g. Language enums doesn't hit the default where JsonExceptions are caught returning Unsupported.
The text was updated successfully, but these errors were encountered: