Re: Unmarshal Map to POJO with Jackson data format

2020-08-04 Thread Mark Nuttall
you could add an inline processor and specifically call the ObjectMapper method you need. Or some variant of that. While it is not an OOTB camel component, it is one less conversion. On Mon, Aug 3, 2020 at 9:49 PM Jeremy Ross wrote: > Hey Sneharghya, > > Thanks, that is my workaround. Just hopin

Re: Unmarshal Map to POJO with Jackson data format

2020-08-03 Thread Jeremy Ross
Hey Sneharghya, Thanks, that is my workaround. Just hoping for something a little more efficient. On Mon, Aug 3, 2020 at 2:36 PM Sneharghya Pathak wrote: > Hi Jeremy, > > The way I fixed it was to first convert it to json and then to a pojo, like > so: > > .marshal().json(JsonLibrary.Jackson) .

Re: Unmarshal Map to POJO with Jackson data format

2020-08-03 Thread Sneharghya Pathak
Hi Jeremy, The way I fixed it was to first convert it to json and then to a pojo, like so: .marshal().json(JsonLibrary.Jackson) .unmarshal().json(JsonLibrary.Jackson, MyClass.class) Regards, Sneharghya On Mon, 3 Aug 2020, 10:25 pm Jeremy Ross, wrote: > Howdy, > > Is it possible to unmarshal

Unmarshal Map to POJO with Jackson data format

2020-08-03 Thread Jeremy Ross
Howdy, Is it possible to unmarshal from a Map to POJO with the Jackson data format? When I pass it a map, I get: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value... ObjectMapper#convertValue supports this, but I'm not sure how to play nice wi