Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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
- relates to
-
NIFI-13090 Backport Improve handling of embedded JSON records
- Resolved
- links to