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 2017/01/13 11:32:26 UTC

[jira] [Commented] (CAMEL-10702) camel-jsonpath - Allow to define predicates even easier

    [ https://issues.apache.org/jira/browse/CAMEL-10702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15821664#comment-15821664 ] 

Claus Ibsen commented on CAMEL-10702:
-------------------------------------

And you can also do
{code}
                        .when().jsonpath("price < ${header.cheap}")
{code}

> camel-jsonpath - Allow to define predicates even easier
> -------------------------------------------------------
>
>                 Key: CAMEL-10702
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10702
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jsonpath
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.19.0
>
>
> When using jsonpath for predicates the syntax can be a bit complex to understand and learn for even the simplest things.
> So having to do
> {code}
>                         .when().jsonpath("$.store.book[?(@.price < ${header.cheap})]")
> {code}
> We can try to let Camel be smart and help you with a easy syntax when you have one operator and in predicate mode, so this can be just
> {code}
>                         .when().jsonpath("store.book.price < ${header.cheap}")
> {code}
> Then camel-jsonpath will parse this and build the complexer jsonpath syntax on your behalf.
> Not having to remember the complexities of [?@.] and other hard to remember symbols to just say a simple predicate if X < Y etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)