Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Jackson XML

Available as of Camel 2.16

Jackson XML is a Data Format which uses the Jackson library with the XMLMapper extension to unmarshal an XML payload into Java objects or to marshal Java objects into an XML payload.

...

Include/Exclude fields using the jsonView attribute with JacksonXMLDataFormat

...

As an example of using this attribute you can instead of:

...

Using custom Jackson modules

Available as of Camel 2.15

You can use custom Jackson modules by specifying the class names of those using the moduleClassNames option as shown below.

...

Code Block
from("direct:inPretty").marshal().jacksonxml(true);

Please note that as of Camel 2.16 there are 5 different overloaded jacksonxml() DSL methods which support the prettyPrint option in combination with other settings for unmarshalTypejsonView etc. 

...