blob: 6f39d0e08fa8d456b53a370615a654123f6586ae [file] [log] [blame]
[[Boon-Boon]]
Boon
~~~~
*Available in Camel 2.16*
Boon is a Data Format which uses the
http://richardhightower.github.io/site/Boon/Welcome.html[Boon
JSONmarshalling library to unmarshal an JSON payload into Java objects
or to marshal Java objects into an JSON payload. Boon aims to be a
simple
and https://github.com/RichardHightower/json-parsers-benchmark[fast
parserthan other common parsers currently used.
[[Boon-UsingtheJavaDSL]]
Using the Java DSL
^^^^^^^^^^^^^^^^^^
[source,java]
------------------------------------------------------------------------
DataFormat boonDataFormat = new BoonDataFormat("com.acme.model.Person");
from("activemq:My.Queue")
.unmarshal(boonDataFormat)
.to("mqseries:Another.Queue");
------------------------------------------------------------------------
[[Boon-UsingBlueprintXML]]
Using Blueprint XML
^^^^^^^^^^^^^^^^^^^
[source,java]
---------------------------------------------------------------------------------
<bean id="boonDataFormat" class="org.apache.camel.component.boon.BoonDataFormat">
<argument value="com.acme.model.Person"/>
</bean>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="activemq:My.Queue"/>
<unmarshal ref="boonDataFormat"/>
<to uri="mqseries:Another.Queue"/>
</route>
</camelContext>
---------------------------------------------------------------------------------
[[Boon-Dependencies]]
Dependencies
^^^^^^^^^^^^
[source,java]
-------------------------------------
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-boon</artifactId>
<version>x.x.x</version>
</dependency>
-------------------------------------