You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/07/31 07:53:20 UTC

[jira] [Assigned] (CAMEL-10189) camel-jsonpath - Add support for simple functions

     [ https://issues.apache.org/jira/browse/CAMEL-10189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-10189:
-----------------------------------

    Assignee: Claus Ibsen

> 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
>            Assignee: 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)