Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.14.0
-
None
-
Unknown
Description
The existing code of camel jackson dataformat does not support that we
disable the JaxbAnnotationModule()
public JacksonDataFormat(Class<?> unmarshalType, Class<?> jsonView) { this.objectMapper = new ObjectMapper(); this.unmarshalType = unmarshalType; this.jsonView = jsonView; // Enables JAXB processing JaxbAnnotationModule module = new JaxbAnnotationModule(); this.objectMapper.registerModule(module); }
If we have an attribute like this:
@XmlAttribute(name = "has-children", required = true) private Boolean hasChildren;
In previous version (2.9.7 for instance):
XML: "has-children" Json: "hasChildren"
In the current one (2.14.0):
XML: "has-children" Json: "has-children"