-
Bug
-
Resolution: Done
-
Major
-
37.0.0.Final, 37.0.1.Final
-
None
After upgrade to 37.0.0.Final (also present on 37.0.1.Final), when both XML bind annotations and Jackson annotations is set on a POJO returned by jax-rs with media-type "application/json", the resulting JSON returned is using the XML annotations.
e.g.
@JsonProperty("jsonElement") @XmlElement(name = "xml-element") private String testElement = "testValue";
Will return {"xml-element": "testValue"}
This behavior is different than WF 36 and prior.
I believe the cause is that in WF 37, it ends up using an AnnotationIntrospectorPair [JakartaXmlBindAnnotationIntroSpector, JacksonAnnotationIntrospector],
while in WF 36, it was just using a JacksonAnnotationIntrospector.
This can be worked-around by registering a custom ContextResolver<ObjectMapper>, but I would like to know if this change is intended, and if the "legacy" behavior is supported?
Alternatively, if the choice of priority for introspector/module could be made controllable?
- is triggered by
-
WFLY-20682 Move the exported modules from RESTEasy modules to adding the dependencies in a DUP
-
- Resolved
-