[
https://issues.apache.org/jira/browse/CAMEL-7858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146099#comment-14146099
]
Nicolás Amador commented on CAMEL-7858:
---------------------------------------
Thank you so much!
> 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
> Assignee: Willem Jiang
> Priority: Minor
> Fix For: 2.15.0
>
>
> 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)