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

Expression Language isJson and AttributesToJSON processor do not consider an attribute with leading and trailing spaces to be JSON

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.25.0, 2.0.0-M2
    • None

    Description

      If there is an attribute which has embedded JSON but it has leading and and trailing spaces e.g.

      "\n{\"name\":\"John\", \"age\":30, \"car\":null}\n"

      the NIFI Expression Language isJson method does not consider it JSON and the AttributesToJSON processor when the JsonHandlingStrategy is NESTED does not consider it JSON. This is contrary to Jackson's ObjectMapper behavior which will parse the above example as a map.

      Attachments

        Issue Links

          Activity

            People

              dstiegli1 Daniel Stieglitz
              dstiegli1 Daniel Stieglitz
              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 - 1h
                  1h