Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10189

camel-jsonpath - Add support for simple functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.18.0
    • camel-jsonpath
    • None
    • Unknown

    Description

      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

      "$.person[?(@.role=='${headers.role}')]"
      

      gets pre-parsed as

      "$.person[?(@.role=='?')]"
      

      And then we know that ${headers.role} is the simple funktion to execute as the predicate.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: