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

Problem with JSON serialization when using a global enum converter #101

Open
bramve-fenetre opened this issue Aug 11, 2021 · 0 comments
Open

Comments

@bramve-fenetre
Copy link

Hello,

In our project we changed the default JSON.NET configuration to use a enum to string converter globally. Meaning all enums are converted to strings when serialized.

This however causes the messagebird library to stop working, this is due to the Class field in the Message.cs file being an enum, which then is serialized to a string while the underlying messagebird API expects a int.

We currently worked around it by making a fork and changing the Class field to an int, see: Fenetre@2b151fe

But I imagine you would not want to fix it like this and instead use isolated JSON.NET serialization settings instead of the global once.

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