Replies: 1 comment
-
Unfortunately this isn't possible at this point without a custom serializer for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a nested structure such that a property of my main class is a sub-class. By default, during serialization the sub-class creates a tag even when it has no attributes. My goal is to flatten this structure by eliminating the
<MessageDate>
tags and just have<Year>
<Month>
and<Day>
be immediate children of<MyMessage>
(and siblings of<MessageText>
)Can this be done with an annotation (best option) or policy, or a custom serializer? I will also want to be able to de-serialize XML strings with a flatter structure than my class hierarchy.
Thank you very much!
default output:
desired output:
Beta Was this translation helpful? Give feedback.
All reactions