[
https://issues.apache.org/jira/browse/NIFI-12480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17840418#comment-17840418
]
ASF subversion and git services commented on NIFI-12480:
--------------------------------------------------------
Commit 91976349f08a79868ea8b2fde877f13d209562c4 in nifi's branch
refs/heads/support/nifi-1.x from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=91976349f0 ]
NIFI-13090 Backport Improve handling of embedded JSON records (NIFI-12480)
Co-authored-by: krisztina-zsihovszki <[email protected]>
> Improve handling of embedded JSON records
> -----------------------------------------
>
> Key: NIFI-12480
> URL: https://issues.apache.org/jira/browse/NIFI-12480
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 2.0.0-M2
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)