[ 
https://issues.apache.org/jira/browse/CAMEL-5604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Pilone updated CAMEL-5604:
----------------------------------

    Attachment: JacksonCollectionDataFormat.java

I attached a simple class that I used to solve the problem. In my routes I 
configured it as:

{code}
.to(ExchangePattern.InOut, 
"activemq:queue:subscriptions.getAll?requestTimeout=60000")
.unmarshal(new JacksonCollectionDataFormat(objectMapper, Subscription.class))
{code}

The constructor takes the value type and an optional collection type. Maybe the 
code can help provide a common solution.

> camel-jackson - Make it easier to support List as output out of the box
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-5604
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5604
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jackson
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: JacksonCollectionDataFormat.java
>
>
> See nabble
> http://camel.465427.n5.nabble.com/JSON-Jackson-return-list-rather-than-POJO-tp5717341.html
> We should look into making it easier to output a List as output with jackson 
> json. On the nabble link there is an example and pseduo code how to do that.
> We should find a way to make that easy in Camel. Either as some new option, 
> or somehow auto detect its a List etc.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to