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
{{ message }}
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
It seams that JaxbAnnotationIntrospector is ignoring @XmlElementRef annotations if they are coupled with @XmlElementWrapper. For example, take this two simple beans:
It seams that
JaxbAnnotationIntrospector
is ignoring@XmlElementRef
annotations if they are coupled with@XmlElementWrapper
. For example, take this two simple beans:and this data:
When serialized to XML (using
JAXB.marshal(...)
) output is fine:However, when serializing to JSON (using
ObjectMapper.writeValue(...)
) whole"data" part is missing and output is just:
I've found out, that I can get correct JSON output if I use
@XmlElement
instead of
@XmlElementRef
onFoo.bars
:Output:
Unfortunatelly, changing
@XmlElementRef
to@XmlElement
is not viablesolution in complex project.
Note: in all above examples
MapperFeature.USE_WRAPPER_NAME_AS_PROPERTY_NAME
was set to true.
The text was updated successfully, but these errors were encountered: