How do I get XMLMapper from Jackson to set the name of the root xml element during serialization?
There is an annotation to do this if you serialize pojo: @XmlRootElement (name = "blah"). But I am serializing a common Java class, LinkedHashMap, so I cannot use annotation.
There is probably some kind of switch to set it. Expressing Jackson's code, I see a class called SerializationConfig.withRootName (), but I don't know how to use it.
source
share