[
https://issues.apache.org/jira/browse/NIFI-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807771#comment-16807771
]
Tobin edited comment on NIFI-4692 at 4/2/19 1:49 PM:
-----------------------------------------------------
I would like this to work as described in the docs.
If the docs are changed to match the logic, please can we have a new option to
set empty / blank / non-existent attributes to null in the JSON.
Edit to add: Version 1.9.1
was (Author: tobin):
I would like this to work as described in the docs.
If the docs are changed to match the logic, please can we have a new option to
set empty / blank / non-existent attributes to null in the JSON.
> 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: Joseph Percivall
> 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
(v7.6.3#76005)