You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR ] Unable to serialize property 'order' from com.sebastian_daschner.openliberty.Coffee
[ERROR ] Generating incomplete JSON
[ERROR ] Problem with writing the data, class com.sebastian_daschner.openliberty.Coffee, ContentType: application/json
If both properties order and orderLink have the same type, it works as expected (i.e. orderLink is serialized as "order").
However, if we annotate @JsonbProperty on the setter instead, it works:
Originally raised by @sdaschner in these issues:
OpenLiberty: OpenLiberty/open-liberty#13640
Quarkus: quarkusio/quarkus#11594
Describe the bug
When mapping a class via JSON-B, and annotating fields as follows, the result throws an error because of mismatching types:
this results in:
If both properties
order
andorderLink
have the same type, it works as expected (i.e.orderLink
is serialized as"order"
).However, if we annotate
@JsonbProperty
on the setter instead, it works:Response:
There seems to be an unexpected type link of the (ignored) property with the default serialized JSON key
"order"
, and the custom name binding.To Reproduce
See code snippets in description
Expected behavior
Original code should deserialize into the expected JSON of:
instead of throwing an error
The text was updated successfully, but these errors were encountered: