Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
JOLT ComponentAvailable as of Camel 2.16 The jolt: component allows you to process a JSON messages using an JOLT specification. This can be ideal when doing JSON to JSON transformation. Maven users will need to add the following dependency to their <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 formatjolt: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.json). You can append query options to the URI in the following format, Options
Dynamic specificationCamel provides a header by which you can define a different resource location for a specification. If this header is set then Camel uses this over the endpoint configured resource. This allows you to provide a dynamic specification at runtime.
SamplesFor example you could use something like from("activemq:My.Queue"). to("jolt:com/acme/MyResponse.json"); And a file based resource: 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: from("direct:in"). setHeader("CamelJoltResourceUri").constant("path/to/my/spec.json"). to("jolt:dummy");
|