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
Yes, Jackson defaults to wrapping Lists by default.
This is different from JAXB defaults, but Jackson is not a JAXB implementation; it has partial support for JAXB annotations but does not have exactly same defaulting.
There is a way to change this default; I forget the method but there's one in XMLMapper.
cowtowncoder
changed the title
List serialization without @XmlElementWrapper not working correctly
List serialization without @XmlElementWrapper not working correctly (need to enable XmlMapper.defaultUseWrapper(false))
Mar 29, 2023
When serializing a list without
@XmlElementWrapper
, the list is still wrapped inside another element. The following unit test reproduces the problem:The second test when using Jackson instead of JAXB fails because the actual output is as follows:
but I would expect it to be like this:
I'm using java 17 and jackson 2.15.0-rc1.
test.zip
The text was updated successfully, but these errors were encountered: