Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DCB3911BF9 for ; Wed, 24 Sep 2014 09:03:35 +0000 (UTC) Received: (qmail 63833 invoked by uid 500); 24 Sep 2014 09:03:35 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 63810 invoked by uid 500); 24 Sep 2014 09:03:35 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 63800 invoked by uid 99); 24 Sep 2014 09:03:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Sep 2014 09:03:35 +0000 Date: Wed, 24 Sep 2014 09:03:35 +0000 (UTC) From: "Willem Jiang (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-7858) Allow to disable Jaxb annotations in JacksonDataFormat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7858?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved CAMEL-7858. --------------------------------- Resolution: Fixed Fix Version/s: 2.15.0 Applied the patch into camel master branch. > 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=C3=A1s Amador > Assignee: Willem Jiang > Priority: Minor > Fix For: 2.15.0 > > > The existing code of camel jackson dataformat does not support that we=20 > disable the JaxbAnnotationModule()=20 > {code} > public JacksonDataFormat(Class unmarshalType, Class jsonView) {=20 > this.objectMapper =3D new ObjectMapper();=20 > this.unmarshalType =3D unmarshalType;=20 > this.jsonView =3D jsonView;=20 > // Enables JAXB processing=20 > JaxbAnnotationModule module =3D new JaxbAnnotationModule();=20 > this.objectMapper.registerModule(module);=20 > }=20 > {code} > If we have an attribute like this:=20 > {code} > @XmlAttribute(name =3D "has-children", required =3D true)=20 > private Boolean hasChildren;=20 > {code} > In previous version (2.9.7 for instance):=20 > {code} > XML: "has-children"=20 > Json: "hasChildren"=20 > {code} > In the current one (2.14.0):=20 > {code} > XML: "has-children"=20 > Json: "has-children"=20 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)