You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Gábor Gyimesi (Jira)" <ji...@apache.org> on 2021/08/18 15:03:00 UTC
[jira] [Commented] (NIFI-4692) AttributesToJSON "Null Value"
description doesn't match implementation
[ https://issues.apache.org/jira/browse/NIFI-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17401123#comment-17401123 ]
Gábor Gyimesi commented on NIFI-4692:
-------------------------------------
According to [~markap14] _"If the attribute exists, but has an empty value (i.e., its value is empty string), it should probably go into the JSON as an empty string - the point is to create JSON from the existing values, not to modify values inline."_ I will update the documentation the same way it was added in the MiNiFi C++ implementation.
> AttributesToJSON "Null Value" description doesn't match implementation
> ----------------------------------------------------------------------
>
> Key: NIFI-4692
> URL: https://issues.apache.org/jira/browse/NIFI-4692
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Joe Percivall
> Assignee: Gábor Gyimesi
> Priority: Minor
>
> The description for the "Null Value" property is "If true a non existing or empty attribute will be NULL in the resulting JSON. If false an empty string will be placed in the JSON". In particular, the "empty attribute" portion leads me to believe that if the attribute exists but is an empty string, the resulting JSON would be NULL (when the property is 'true').
> In actuality, the property only appears to change whether a missing attribute will be NULL or an empty string ("")[1].
> Since no one has brought it up as an issue, I assume it is working as people would like so the documentation should be adjusted to match the actual logic. Potentially adding a second property for how to treat attributes with a value of an empty string.
> [1] https://github.com/apache/nifi/blob/e62417ea6b189ad0e7522cffd68481dd5df7ffd8/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToJSON.java#L181
--
This message was sent by Atlassian Jira
(v8.3.4#803005)