eclipse-ee4j / yasson

Eclipse Yasson project
https://projects.eclipse.org/projects/ee4j.yasson
Other
204 stars 96 forks source link

@JsonbTypeDeserializer is ignored on Enums in 3.0.3; works in 2.0.4 #617

Open api-from-the-ion opened 1 year ago

api-from-the-ion commented 1 year ago

Describe the bug I wanted a custom Serializer / Deserializer for my enum. I found the adapter code here and separate it into two different classes. But the @JsonbTypeDeserializer is ignored in 3.0.3, and not in 2.0.4. Both @JsonbTypeSerializer and @JsonbTypeAdapter are registered in 3.0.3 and 2.0.4. So it's only @JsonbTypeDeserializer which is ignored.

To Reproduce I created a small project with both scenarios, Serializer / Deserializer and adapter. One can comment one or another. One can also easily play with Yasson version there and see the test falls through or not. https://github.com/api-from-the-ion/yasson-enum-bug-evaluation

Expected behavior The Deserializer and test should work both in 3.x and 2.x versions,

System information: