You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Arnaud Deprez <ar...@gmail.com> on 2016/04/04 15:49:46 UTC

Question: register jackson module with auto binding in rest dsl

Hi camel riders,

I've one question (which is by the way in the title):

   - Is there a way to register jackson modules (ie jdk8 & jsr310) in the
   RestBinding.auto configuration for services exposed with the rest-dsl ?

Thanks in advance and keep riding !

Rgds,


-- 
Arnaud Deprez

Re: Question: register jackson module with auto binding in rest dsl

Posted by Arnaud Deprez <ar...@gmail.com>.
Thanks Claus,

After having hacked the camel code a couple of hour, I've found this
solution too and it works like a charm.

It would be nice to document it better.
If I find time today in the evening or tomorrow, I'd be honored to
contribue to it.

Although I've noticed a small restriction with the include option which
allows only one option, but with jackson you can put many together (for
example: NON_NULL, NON_EMPTY, NON_ABSENT).
I can also bring contribution here.

Regards,

On Mon, Apr 4, 2016 at 5:07 PM Claus Ibsen <cl...@gmail.com> wrote:

> You can configure the class names of those custom modules
> http://camel.apache.org/json.html
>
> And if using the rest-dsl you can configure that using the
> dataFormatProperty style.
>
> Or you can refer to existing modules in the registry using the id's
> with the moduleRefs option.
>
> On Mon, Apr 4, 2016 at 3:49 PM, Arnaud Deprez <ar...@gmail.com>
> wrote:
> > Hi camel riders,
> >
> > I've one question (which is by the way in the title):
> >
> >    - Is there a way to register jackson modules (ie jdk8 & jsr310) in the
> >    RestBinding.auto configuration for services exposed with the rest-dsl
> ?
> >
> > Thanks in advance and keep riding !
> >
> > Rgds,
> >
> >
> > --
> > Arnaud Deprez
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
-- 
Arnaud Deprez

Re: Question: register jackson module with auto binding in rest dsl

Posted by Claus Ibsen <cl...@gmail.com>.
You can configure the class names of those custom modules
http://camel.apache.org/json.html

And if using the rest-dsl you can configure that using the
dataFormatProperty style.

Or you can refer to existing modules in the registry using the id's
with the moduleRefs option.

On Mon, Apr 4, 2016 at 3:49 PM, Arnaud Deprez <ar...@gmail.com> wrote:
> Hi camel riders,
>
> I've one question (which is by the way in the title):
>
>    - Is there a way to register jackson modules (ie jdk8 & jsr310) in the
>    RestBinding.auto configuration for services exposed with the rest-dsl ?
>
> Thanks in advance and keep riding !
>
> Rgds,
>
>
> --
> Arnaud Deprez



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2