Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFC9FD9DD for ; Tue, 14 Aug 2012 19:44:21 +0000 (UTC) Received: (qmail 92045 invoked by uid 500); 14 Aug 2012 19:44:21 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 92004 invoked by uid 500); 14 Aug 2012 19:44:21 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 91996 invoked by uid 99); 14 Aug 2012 19:44:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 19:44:21 +0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 19:44:14 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T1N1t-0007wu-OT for users@camel.apache.org; Tue, 14 Aug 2012 12:43:53 -0700 Date: Tue, 14 Aug 2012 12:43:53 -0700 (PDT) From: ychawla To: users@camel.apache.org Message-ID: <1344973433733-5717347.post@n5.nabble.com> In-Reply-To: <1344968822385-5717341.post@n5.nabble.com> References: <1344968822385-5717341.post@n5.nabble.com> Subject: Re: JSON - Jackson return list rather than POJO MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit A simple workaround for this is a custom bean processor like so: public void processPersonSearchResponseJSON(Exchange exchange) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(); List personSearchResponses = mapper.readValue(exchange.getIn().getBody(String.class), new TypeReference>() { }); exchange.getIn().setBody(personSearchResponses); } and in the camel context: -- View this message in context: http://camel.465427.n5.nabble.com/JSON-Jackson-return-list-rather-than-POJO-tp5717341p5717347.html Sent from the Camel - Users mailing list archive at Nabble.com.