= JOLT Component
:doctitle: JOLT
:shortname: jolt
:artifactid: camel-jolt
:description: JSON to JSON transformation using JOLT.
:since: 2.16
:supportlevel: Stable
:component-header: Only producer is supported
//Manually maintained attributes
:camel-spring-boot-name: jolt

*Since Camel {since}*

*{component-header}*

The Jolt component allows you to process a JSON messages using an
https://github.com/bazaarvoice/jolt[JOLT] specification. This can be
ideal when doing JSON to JSON transformation.

Maven users will need to add the following dependency to
their `pom.xml` for this component:

[source,xml]
------------------------------------------------------------
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-jolt</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
------------------------------------------------------------


== URI format

-----------------------
jolt:specName[?options]
-----------------------

Where *specName* is the classpath-local URI of the specification to
invoke; or the complete URL of the remote specification
(eg: \file://folder/myfile.vm).


// 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 you could use something like

[source,java]
--------------------------------------
from("activemq:My.Queue").
  to("jolt:com/acme/MyResponse.json");
--------------------------------------

And a file based resource:

[source,java]
---------------------------------------------------------------
from("activemq:My.Queue").
  to("jolt:file://myfolder/MyResponse.json?contentCache=true").
  to("activemq:Another.Queue");
---------------------------------------------------------------

You can also specify what specification the component should use
dynamically via a header, so for example:

[source,java]
---------------------------------------------------------------------
from("direct:in").
  setHeader("CamelJoltResourceUri").constant("path/to/my/spec.json").
  to("jolt:dummy?allowTemplateFromHeader=true");
---------------------------------------------------------------------



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