You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2015/10/12 07:18:44 UTC
svn commit: r968575 - in /websites/production/camel/content:
cache/main.pageCache jackson-xml.html
Author: buildbot
Date: Mon Oct 12 05:18:43 2015
New Revision: 968575
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/jackson-xml.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/jackson-xml.html
==============================================================================
--- websites/production/camel/content/jackson-xml.html (original)
+++ websites/production/camel/content/jackson-xml.html Mon Oct 12 05:18:43 2015
@@ -86,7 +86,7 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="JacksonXML-JacksonXML">Jackson XML</h2><p>Jackson XML is a <a shape="rect" href="data-format.html">Data Format</a> which uses the <a shape="rect" class="external-link" href="http://wiki.fasterxml.com/JacksonHome/" rel="nofollow">Jackson library</a> with the <a shape="rect" class="external-link" href="https://github.com/FasterXML/jackson-dataformat-xml" rel="nofollow">XMLMapper extension</a> to unmarshal an XML payload into Java objects or to marshal Java objects into an XML payload.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 id="JacksonXML-JacksonXML">Jackson XML</h2><p><strong>Available as of Camel 2.16</strong></p><p>Jackson XML is a <a shape="rect" href="data-format.html">Data Format</a> which uses the <a shape="rect" class="external-link" href="http://wiki.fasterxml.com/JacksonHome/" rel="nofollow">Jackson library</a> with the <a shape="rect" class="external-link" href="https://github.com/FasterXML/jackson-dataformat-xml" rel="nofollow">XMLMapper extension</a> to unmarshal an XML payload into Java objects or to marshal Java objects into an XML payload.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("activemq:My.Queue").
unmarshal().jacksonxml().
to("mqseries:Another.Queue");
@@ -132,7 +132,7 @@ from("direct:inPojoAgeView").m
]]></script>
</div></div>Note that the weight field is missing in the resulting JSON:<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[{"age":30, "weight":70}]]></script>
-</div></div><h3 id="JacksonXML-Include/ExcludefieldsusingthejsonViewattributewithJacksonXMLDataFormat">Include/Exclude fields using the <code>jsonView</code> attribute with <code>JacksonXML</code>DataFormat</h3><p><strong>Available as of Camel 2.12</strong></p><p>As an example of using this attribute you can instead of:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="JacksonXML-Include/ExcludefieldsusingthejsonViewattributewithJacksonXMLDataFormat">Include/Exclude fields using the <code>jsonView</code> attribute with <code>JacksonXML</code>DataFormat</h3><p>As an example of using this attribute you can instead of:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[JacksonXMLDataFormat ageViewFormat = new JacksonXMLDataFormat(TestPojoView.class, Views.Age.class);
from("direct:inPojoAgeView").
marshal(ageViewFormat);
@@ -181,7 +181,7 @@ format.setUnmarshalType(MyPojo.class);]]
<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ <dataFormats>
<jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo"/>
</dataFormats>]]></script>
-</div></div><h3 id="JacksonXML-UsingcustomJacksonmodules">Using custom Jackson modules</h3><p><strong>Available as of Camel 2.15</strong></p><p>You can use custom Jackson modules by specifying the class names of those using the moduleClassNames option as shown below.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="JacksonXML-UsingcustomJacksonmodules">Using custom Jackson modules</h3><p>You can use custom Jackson modules by specifying the class names of those using the moduleClassNames option as shown below.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ <dataFormats>
<jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
</dataFormats>]]></script>
@@ -214,7 +214,7 @@ Invoice invoice = exchange.getIn().getBo
</dataFormats>]]></script>
</div></div><p><span>And in Java DSL:</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:inPretty").marshal().jacksonxml(true);]]></script>
-</div></div><p><span>Please note that as of Camel 2.16 there are 5 different overloaded <code>jacksonxml()</code> DSL methods which support the <code>prettyPrint</code> option in combination with other settings for <code>unmarshalType</code>, <code>jsonView</code> etc. </span></p><h3 id="JacksonXML-Dependencies">Dependencies</h3><p>To use Jackson XML in your camel routes you need to add the dependency on <strong>camel-jacksonxml</strong> which implements this data format.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p><span>Please note that there are 5 different overloaded <code>jacksonxml()</code> DSL methods which support the <code>prettyPrint</code> option in combination with other settings for <code>unmarshalType</code>, <code>jsonView</code> etc. </span></p><h3 id="JacksonXML-Dependencies">Dependencies</h3><p>To use Jackson XML in your camel routes you need to add the dependency on <strong>camel-jacksonxml</strong> which implements this data format.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jacksonxml</artifactId>