Hello
Thanks to the help of Christian......now it works :
from("http://gateway.m...URL.....805d").
unmarshal().json(JsonLibrary.Jackson).
split(simple("${body[data][results]}")).
* bean(new ComicBuilder(), "parse(${body[title]},
${body[thumbnail][path]}, ${body[prices][0][price]}, ${body[id]})").*
to("stream:out");
Now I'm using a builder that creates new MarvelComicReduced instances....
Is there any way to not use a custom Builder and that Camel automatically
creates new POJOS using the final POJO constructor ?
Kind regards.
[image: Inline image 2]
* Jonathan Vila ** <https://www.twitter.com/jonathan_vila>
<http://www.linkedin.com/in/jonathanvila>*
* [email protected] <[email protected]>*
On Mon, Oct 27, 2014 at 4:24 PM, Jonathan Vila Lopez <
[email protected]> wrote:
> Hello
>
> I want to get some fields from a Map structure and put those fields into a
> Bean.
>
> I have this code :
>
> from("http://....URL to a REST service that returns a JSon ...").
> unmarshal().json(JsonLibrary.Jackson).
> split(simple("${body[data][results]}")).
> *log("COMIC :
> ${body[id]}---${body[title]}----${body[prices][0][price]} ");*
>
> After the log line I want to put those 2 values into a new Bean fields.
>
> Is there any built-in transformation process inside camel that is capable
> of create new POJOs and assign values ?
>
> Kind regards.
>
>
>
> [image: Inline image 2]
>
> * Jonathan Vila ** <https://www.twitter.com/jonathan_vila>
> <http://www.linkedin.com/in/jonathanvila>*
>
>
> * [email protected] <[email protected]>*
>
>
>
>