Closed RahulKwani closed 1 year ago
@RahulKwani Have you tried inquiry to jackson-dataformat-xml module? FYI, jackson-databind
does not depend on xml module 👍🏻
There is no way to automate such conversions at this point.
I was able to serilize using a custom serilizer, but it seems deserilization is still a headache. It be great if there is way to collect common tags (@JacksonXmlElementWrapper
.
Closed this now as this feature will not have much usage.
I am using Jackson XML annotation to serialize/deserialize xml output of my spring boot APIs. This API is meant to provide legacy support. Because of that, it's required to have the exact same response structure as the existing API.
I encountered a peculiar situation for which I could not find any solution. I tried customSerilizer but that also doesn't seem to solve the problem.
I need to serialize
A
andB
tags into pairs without any parent tags. The existing API serializes data in this format:My pojo look like this:
Can it be achived using this library? Whatever I try at the end all of A and B tags are grouped after serialization. Maybe some combination of annotations I haven't come across?
I had asked this same question on Stackoverflow: https://stackoverflow.com/questions/76512689/how-to-print-custom-sequence-of-tag-using-jackson-databind-lib-in-java