Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor editorial changes

...

In Camel 2.0 we added support for more libraries:
Camel provides integration with two three popular JSon JSON libraries:

By default Camel uses the XStream library.

Using

...

JSON data format with the XStream library

Code Block
// lets turn Object messages into json then send to MQSeries
from("activemq:My.Queue").
  marshal().json().
  to("mqseries:Another.Queue");

Using

...

JSON data format with the Jackson library

Code Block
// lets turn Object messages into json then send to MQSeries
from("activemq:My.Queue").
  marshal().json(JsonLibrary.Jackson).
  to("mqseries:Another.Queue");

Using

...

JSON data format with the GSON library

Code Block
// lets turn Object messages into json then send to MQSeries
from("activemq:My.Queue").
  marshal().json(JsonLibrary.Gson).
  to("mqseries:Another.Queue");

Using

...

JSON in Spring DSL

When using Data Format in Spring DSL you need to declare the data formats first. This is done in the DataFormats XML tag.

...