-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 polymorphism not working correctly with DEDUCTION #3711
Comments
I am not sure usage as indicated makes sense -- you are enabling polymorphic type handling for type indicator Serialization of |
Ahhhhhh. So the problem is that
with assumption that prevents serialization of type id -- it does but ONLY if value is written as JSON Object. I'll have to think of best way to tackle the issue; instead of using an existing |
Ok this gets surprisingly tricky to fix, due to |
Ok, managed to make it work at least for all existing tests, 2 new simple cases, see #3716. |
Thank you so much! When will the new version be available with this change? |
@smilep No idea, unfortunately. Full patch release takes 3-4 hours to do and it's unpaid work for me, with lots of competing things to do. Will probably take until late january - mid-february if I had to guess. |
@cowtowncoder Thanks. Really appreciate your work! Please do let me know if I can be on any help in releases or anything else. |
Describe the bug
When an interface type is being used for an attribute and an enum implements this interface, resulting serialization and deserialization behavior is incorrect.
Version information
2.14.1
To Reproduce
If you have a way to reproduce this with:
Output :
Expected behavior
Serialization should produce
{"type":"FOURLEGGED","name":"Horse"}
Deserialization should produce
Animal
instance withtype
having value ofAnimalType.FOURLEGGED
instance.The text was updated successfully, but these errors were encountered: