= Data Format Component
:doctitle: Data Format
:shortname: dataformat
:artifactid: camel-dataformat
:description: Use a Camel Data Format as a regular Camel Component.
:since: 2.12
:supportlevel: Stable
:component-header: Only producer is supported
:core:
//Manually maintained attributes
:camel-spring-boot-name: dataformat

*Since Camel {since}*

*{component-header}*

The Dataformat component allows to use xref:manual::data-format.adoc[Data
Format] as a Camel Component.

== URI format

[source]
----
dataformat:name:(marshal|unmarshal)[?options]
----

Where *name* is the name of the Data Format. And
then followed by the operation which must either be `marshal` or
`unmarshal`. The options is used for configuring the xref:manual::data-format.adoc[Data
Format] in use. See the Data Format documentation
for which options it support.

== DataFormat Options


// component-configure options: START

// component-configure options: END

// component options: START
include::partial$component-configure-options.adoc[]
include::partial$component-endpoint-options.adoc[]
// component options: END




// endpoint options: START

// endpoint options: END


== Samples

For example to use the xref:dataformats:jaxb-dataformat.adoc[JAXB] xref:manual::data-format.adoc[Data
Format] we can do as follows:

[source,java]
----
from("activemq:My.Queue").
  to("dataformat:jaxb:unmarshal?contextPath=com.acme.model").
  to("mqseries:Another.Queue");
----

And in XML DSL you do:

[source,xml]
----
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from uri="activemq:My.Queue"/>
    <to uri="dataformat:jaxb:unmarshal?contextPath=com.acme.model"/>
    <to uri="mqseries:Another.Queue"/>
  </route>
</camelContext>
----


include::spring-boot:partial$starter.adoc[]
