camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wein <>
Subject Re: Evaluate JsonPath on string inside a Map
Date Thu, 09 Feb 2017 09:21:33 GMT
souciance wrote:
> Not sure if this is what you are after but I have done it this way:
> .when(PredicateBuilder.isEqualTo(ExpressionBuilder.languageExpression("jsonpath","$.Status"),
> "whatyouwantequalto"))
> The $.Status is a node in the json string.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at
Ah thanks, I need to try something in that direction. Actually I 
realized now that I (probably) had a wrong understanding how simple(...) 
can be used together with jsonpath in Camel 2.18+. I wanted to run a 
jsonpath expression on a simple expression, so basically first 
simple(...) and then jsonpath(...) (without changing the message body!). 
However what's possible in Camel 2.18+ is using a simple expression 
inside a jsonpath expression, so you can't actually change what message 
the jsonpath expression runs on with the simple DSL.
For now I have temporarily saved the message body in a message header 
and restore the message body again after having used the 
setBody(simple(...))/when().jsonpath command. But I guess there are 
better solutions for this problem.

Best regards


View raw message