camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Over-riding JSON deserializers/serializers in Camel w/o using annotations
Date Wed, 24 Dec 2014 09:20:42 GMT
Hi

We now have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-8176

On Sat, Sep 20, 2014 at 7:10 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> Hi
>
> Yeah allow to configure those mappings on camel-jackson could be a
> good idea. Feel free to log a JIRA ticket.
>
> On Fri, Sep 12, 2014 at 11:35 PM, rickaroni <rgfanta@directv.com> wrote:
>> Hi,
>>
>> JSON libraries like Jackson and XStream provide ways of overriding the
>> serializers/deserializers that get used for various specific object types.
>>
>> [While you can always hand-annotate code (e.g. with @JsonSerializer) to use
>> custom serializers and deserializers, that can be cumbersome and invasive.]
>>
>> Some frameworks like Spring provide handy ways to do override the object to
>> serializer/deserializer mappings:
>> http://docs.spring.io/spring/docs/current/javadoc-api/index.html?org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.html
>> <http://docs.spring.io/spring/docs/current/javadoc-api/index.html?org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.html>
>>
>> How can I do the same kind of thing in Camel to override the converters
>> found in the the dataFormats section of camelContext?
>>
>> e.g. How do can I change the converters that get used to convert to/from
>> MyObj1 and MyObj2 below?
>>   <camelContext>
>> ......
>>       <dataFormats>
>>           <json id="MyObj1MarshallingJSON"
>> unmarshalTypeName="com.blah.bleh.MyObj1"  library="Jackson" />
>>           <json id="MyObj2MarshallingJSON"
>> unmarshalTypeName="com.blah.bleh.MyObj2"  library="XStream" />
>>       </dataFormats>
>>
>> Thanks,
>> Rick
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Over-riding-JSON-deserializers-serializers-in-Camel-w-o-using-annotations-tp5756458.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message