Similar to camel-jolt, looking for an integration of apache camel with jsonata [https://jsonata.org/] query and transformation framework. We need to expose Rest API's using apache camel and do json transformation using json query language [jsonata for eg] without doing binding to java objects, as the json structure is quite dynamic.
Asked
Active
Viewed 455 times
2 Answers
1
Here is JSONata Camel component which integrates JSONata processing into Apache Camel.

Petr Aleksandrov
- 1,434
- 9
- 24
0
Camel support jsonpath expression. we can evaluate jsonpath expression [https://jsonpath.com/] without the need to unmarshal json to java object. This will be very helpful when we need to apply transformation to downstream json, which is very dynamic in nature.
import org.apache.camel.Exchange;
import org.apache.camel.Expression;
import org.apache.camel.spi.Language;
Language lan = exchange.getContext().resolveLanguage("jsonpath");
Expression exp = lan.createExpression("$.jsonRoot[?(@.jsonFieldx=='3.0.0')]");
List<?> jsonList = exp.evaluate(exchange, List.class);

shatk
- 465
- 5
- 16