camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <martin.li...@imap.cc>
Subject JSON DataFormat using Jackson
Date Sun, 31 May 2009 11:59:58 GMT
Hi,

I've created CAMEL-1664 which is a DataFormat for JSON using the Jackson
library.  I have been using this library in production where I work
using Converters, but would quite like to be able to use the clearer DSL
methods .marshal().json()., as well as it hopefully being useful to
other camel users.

If the contribution is accepted I have noted a potential issue with the
DSL.  As there is already a data format for JSON using XStream the DSL
would need to know which implementation the user would like.  At first I
thought it could simply detect which dependency you had (either
camel-xstream or camel-jackson), but then this precludes using xstream
for xml and jackon for json. The first solutions that came to mind are:
* Add a new method .marhsal.jackson() -- a little confusing as users may
not know what jackson is
* Add an enum to choose e.g .marshal.json(JsonTypes.JACKSON) -- would
need to choose a default impl
Any other suggestions?

Martin.

Mime
View raw message