jackson-dataformat-xml icon indicating copy to clipboard operation
jackson-dataformat-xml copied to clipboard

XML serialization on list of polymorphic values does not combine property, type id

Open jgribonvald opened this issue 9 years ago • 2 comments

I'm having problems on list serialization, i'm having too much wrapper. how to avoid the wrapper around abstract object ? here is my case : http://stackoverflow.com/questions/37663404/jackson-xml-problems-on-serializing

The generated json format is good.

jgribonvald avatar Jun 07 '16 08:06 jgribonvald

I think I know the problem: type id element should be "folded" into element that represents the object, in case of inclusion of WRAPPER_OBJECT. To be able to do this I think some work is needed for mapper/generator interaction, so that XML-backed generator can handle folding for the special case of type id.

I hope to look into solving this for Jackson 2.9; I realize this will not help on short term (and you are using JAXB), but this is good to resolve for future.

cowtowncoder avatar Jun 10 '16 03:06 cowtowncoder

very good,i getted! thanks!

WenSteven avatar Jun 25 '16 02:06 WenSteven