camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <>
Subject JSON - Jackson return list rather than POJO
Date Tue, 14 Aug 2012 18:27:02 GMT
Hello All,
I am unmarshalling data using Jackson.  My dataFormats bean is set up as

            <json id="personSearchJacksonID" library="Jackson"

However, my return value isn't a simple POJO, it is a list of POJO's.  For
example this is a sample stripped down JSON response:


It returns a list of PersonSearchResponses rather than just a single

In a JUnit test, I did this:

List<PersonSearchResponse> personSearchResponses =
mapper.readValue(inputFile, new
TypeReference<List&lt;PersonSearchResponse>>() { });

Is there an equivalent that I can do in the Spring DSL?  Worse comes worse,
I write a custom bean and pass the JSON response as the body and manually do
'mapper.readValue' and then process the list.

I am on Camel 2.8.4 so I am not using camel-xmljson and converting my POJO
to XML manually.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message