[
https://issues.apache.org/jira/browse/CAMEL-10189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-10189:
--------------------------------
Summary: camel-jsonpath - Add support for simple functions (was:
camel-jsonpath - Add support for simple functions?)
> camel-jsonpath - Add support for simple functions
> -------------------------------------------------
>
> Key: CAMEL-10189
> URL: https://issues.apache.org/jira/browse/CAMEL-10189
> Project: Camel
> Issue Type: Improvement
> Components: camel-jsonpath
> Reporter: Claus Ibsen
>
> See SO
> http://stackoverflow.com/questions/38609231/can-i-use-camel-simple-expression-inside-jsonpath-language
> We can roll our own predicates in jsonpath where you can use ? as the
> placeholder. The trick would be to either inline the functions in the string,
> and then do our own pre-parsing to replace those predicates to ?, eg
> {code}
> "$.person[?(@.role=='${headers.role}')]"
> {code}
> gets pre-parsed as
> {code}
> "$.person[?(@.role=='?')]"
> {code}
> And then we know that ${headers.role} is the simple funktion to execute as
> the predicate.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)