Nicolás Amador created CAMEL-7858:
-------------------------------------
Summary: Allow to disable Jaxb annotations in JacksonDataFormat
Key: CAMEL-7858
URL: https://issues.apache.org/jira/browse/CAMEL-7858
Project: Camel
Issue Type: Improvement
Components: camel-jackson
Affects Versions: 2.14.0
Reporter: Nicolás Amador
Priority: Minor
The existing code of camel jackson dataformat does not support that we
disable the JaxbAnnotationModule()
{code}
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);
}
{code}
If we have an attribute like this:
{code}
@XmlAttribute(name = "has-children", required = true)
private Boolean hasChildren;
{code}
In previous version (2.9.7 for instance):
{code}
XML: "has-children"
Json: "hasChildren"
{code}
In the current one (2.14.0):
{code}
XML: "has-children"
Json: "has-children"
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)