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 10:28:26 UTC

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

Claus Ibsen created CAMEL-10702:
-----------------------------------

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