Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8137

Record Path functions to un/escape JSON

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.11.4
    • 1.14.0
    • None
    • None

    Description

      Record Path functions to:

      • unescape JSON contained within a String field and put the resulting Record fields into the data, e.g. UpdateRecord for / => unescapeJson(/stringified_json) would unescape JSON String in /stringified_json and put the resulting Object fields into the top-level of the Record
      • collect one or more Record fields into an Object that is put into a single stringified JSON field, e.g. UpdateRecord for /stringified_json => escapeJson( / ) would do the reverse of the above

      These would be equivalent to the existing Expression Language functions, but mean there was no need to split records into individual flowfiles, extract the field from the content into an attribute, unescape the JSON then replace the text back into the content and re-merge all the records (which is fidly and resource expensive).

      Attachments

        1. Record_Path_JSON.json
          18 kB
          Chris Sampson

        Activity

          People

            Chris S Chris Sampson
            Chris S Chris Sampson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 10m
                4h 10m