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

Improve handling of embedded JSON records

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M2
    • Core Framework, Extensions
    • None

    Description

      It proves to be difficult to treat embedded JSON elements as Strings. There are times when this is necessary, such as when pushing to a database that declares a field of type JSON or interacting with a web service that expects incoming JSON as a String. However, there's no easy way to do this in NiFi today.

      Instead, what typically happens is that the Record gets converted to a String via a call to toString() and that produces something like MapRecord[name=John Doe, color=blue], which is not helpful.

      However, when a JSON Reader is used, we already have a JSON representation of the Record in the record's SerializedForm. When toString() is called, we should always use the SerializedForm of a Record, if it is available and only fall back to the given version.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              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