You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by namador <ni...@athelia.com> on 2014/09/23 11:37:00 UTC
JacksonDataFormat disable JAXB annotations
Hello,
I'm trying to upgrade my solution to the last version of Camel (2.14.0).
By default, JacksonDataFormat uses JAXB annotations and I'm not interested
in this behavior.
Is there a way to disable it?
I have attributes like this:
@XmlAttribute(name = "has-children", required = true)
private Boolean hasChildren;
In previous version (2.9.7):
XML: "has-children"
Json: "hasChildren"
In the new one (2.14.0):
XML: "has-children"
Json: "has-children"
Thanks in advance.
--
View this message in context: http://camel.465427.n5.nabble.com/JacksonDataFormat-disable-JAXB-annotations-tp5756891.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JacksonDataFormat disable JAXB annotations
Posted by namador <ni...@athelia.com>.
Hi Charles,
Thank you for your response.
I've created ticket:
https://issues.apache.org/jira/browse/CAMEL-7858
Regards,
Nicolás Amador
--
View this message in context: http://camel.465427.n5.nabble.com/JacksonDataFormat-disable-JAXB-annotations-tp5756891p5756935.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JacksonDataFormat disable JAXB annotations
Posted by Charles Moulliard <ch...@gmail.com>.
Hi Namador,
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);
}
Could you raise a ticket on the jira web side to request this feature
please ?
Regards,
On Tue, Sep 23, 2014 at 11:37 AM, namador <ni...@athelia.com>
wrote:
> Hello,
>
> I'm trying to upgrade my solution to the last version of Camel (2.14.0).
> By default, JacksonDataFormat uses JAXB annotations and I'm not interested
> in this behavior.
> Is there a way to disable it?
>
> I have attributes like this:
>
> @XmlAttribute(name = "has-children", required = true)
> private Boolean hasChildren;
>
> In previous version (2.9.7):
> XML: "has-children"
> Json: "hasChildren"
>
> In the new one (2.14.0):
> XML: "has-children"
> Json: "has-children"
>
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JacksonDataFormat-disable-JAXB-annotations-tp5756891.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io