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

JoltTransformJson fails when attribute includes newline or quotation marks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.0
    • None
    • Extensions
    • None

    Description

      While Trying to pass a json object through a JoltTransformJson processor to transform its content. adding one of the flowfiles attributes as part of the content, but it fails and throws jsonUnmarshalException, i managed to figure out the problem was the quotation marks, what i did was set the value of the content part of the jolt to "${comment:replace('\"','\'')}" to remove the quotation marks, but about a day after iv'e discovered the same problem with newline(\n)

      it would be great if the jolttransformjson would have an option to automatically escape those characters and more that might be troublesome

      Attachments

        1. jsonexception.PNG
          59 kB
          Nimrod Avni
        2. jolt.PNG
          16 kB
          Nimrod Avni
        3. flowfile.PNG
          16 kB
          Nimrod Avni

        Activity

          People

            Unassigned Unassigned
            Max Kelada Nimrod Avni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: