You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2012/02/01 09:25:33 UTC

Re: Custom Jackson ObjectMapper

Hi

If Jackson has a number of good configurations options and whatnot,
then we should consider having a <jackson> data format, where you can
configure that.

What other kind of options can you configure, that you would need?


In Camel 3.0 we are talking about allowing the data formats to be
configured using uri notations just like endpoints.
That makes them more flexible.


On Mon, Jan 30, 2012 at 7:14 PM, GPRSLyons <GP...@gmail.com> wrote:
> Is there a currently implemented way in Camel to apply a custom naming
> strategy to Jackson (such as LowerCaseWithUnderscoresStrategy
> http://jackson.codehaus.org/1.9.4/javadoc/org/codehaus/jackson/map/PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.html)?
> Or will this only be possible when we get access to the ObjectMapper in 3.0
> via
>
> ObjectMapper mapper = new ObjectMapper();
> mapper.setPropertyNamingStrategy(new LowerCaseWithUnderscoresStrategy());
>
> Thanks!
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Custom-Jackson-ObjectMapper-tp5060579p5442178.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Custom Jackson ObjectMapper

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-4992


On Wed, Feb 1, 2012 at 6:11 PM, Tim <ch...@gmail.com> wrote:
> I'm running into a similar situation when trying to enable Jackson
> SmileFactory.
> This requires you to create an ObjectMapper with a SmileFactory as the
> argument to it's constructor.
> The way to do this seems to me kind of convoluted.
> It would be more clean if there was a way to register a dataformat provider.
>
> On Wed, Feb 1, 2012 at 2:25 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> Hi
>>
>> If Jackson has a number of good configurations options and whatnot,
>> then we should consider having a <jackson> data format, where you can
>> configure that.
>>
>> What other kind of options can you configure, that you would need?
>>
>>
>> In Camel 3.0 we are talking about allowing the data formats to be
>> configured using uri notations just like endpoints.
>> That makes them more flexible.
>>
>>
>> On Mon, Jan 30, 2012 at 7:14 PM, GPRSLyons <GP...@gmail.com> wrote:
>> > Is there a currently implemented way in Camel to apply a custom naming
>> > strategy to Jackson (such as LowerCaseWithUnderscoresStrategy
>> >
>> http://jackson.codehaus.org/1.9.4/javadoc/org/codehaus/jackson/map/PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.html
>> )?
>> > Or will this only be possible when we get access to the ObjectMapper in
>> 3.0
>> > via
>> >
>> > ObjectMapper mapper = new ObjectMapper();
>> > mapper.setPropertyNamingStrategy(new LowerCaseWithUnderscoresStrategy());
>> >
>> > Thanks!
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Custom-Jackson-ObjectMapper-tp5060579p5442178.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Custom Jackson ObjectMapper

Posted by Tim <ch...@gmail.com>.
I'm running into a similar situation when trying to enable Jackson
SmileFactory.
This requires you to create an ObjectMapper with a SmileFactory as the
argument to it's constructor.
The way to do this seems to me kind of convoluted.
It would be more clean if there was a way to register a dataformat provider.

On Wed, Feb 1, 2012 at 2:25 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> If Jackson has a number of good configurations options and whatnot,
> then we should consider having a <jackson> data format, where you can
> configure that.
>
> What other kind of options can you configure, that you would need?
>
>
> In Camel 3.0 we are talking about allowing the data formats to be
> configured using uri notations just like endpoints.
> That makes them more flexible.
>
>
> On Mon, Jan 30, 2012 at 7:14 PM, GPRSLyons <GP...@gmail.com> wrote:
> > Is there a currently implemented way in Camel to apply a custom naming
> > strategy to Jackson (such as LowerCaseWithUnderscoresStrategy
> >
> http://jackson.codehaus.org/1.9.4/javadoc/org/codehaus/jackson/map/PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.html
> )?
> > Or will this only be possible when we get access to the ObjectMapper in
> 3.0
> > via
> >
> > ObjectMapper mapper = new ObjectMapper();
> > mapper.setPropertyNamingStrategy(new LowerCaseWithUnderscoresStrategy());
> >
> > Thanks!
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Custom-Jackson-ObjectMapper-tp5060579p5442178.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>