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 asciidoc in the repository: https://github.com/apache/camel/blob/master/README.md https://github.com/apache/camel/blob/master/components/readme.adoc
Available as of Camel 2.13
Using XML configuration
See the JSonPath project page for further examples.
Available as of Camel 2.16
And in XML DSL:
This option is also available on the
Inline Simple expressions
Available as of Camel 2.18
It's now possible to in-lined Simple language expressions in the JSonPath expression using the simple syntax
In this example the Simple expression in-lined is the headers with the cheap and average values to be used.
You can turn off support for in-lined simple expression by setting the option
You can use Bean Integration to invoke a method on a bean and use various languages such as JSonPath to extract a value from the message and bind it to a method parameter.
Since Camel version 2.16, the encoding of the JSON document is detected automatically, if the document is encoded in Unicode (
To use JSonPath in your camel routes you need to add the a dependency on
If you use maven you could just add the following to your