Description:
Generates a JSON representation of the input FlowFile Attributes. The resulting JSON can be written to either a new Attribute ‘JSONAttributes’ or written to the FlowFile as content.
Tags:
json, attributes, flowfile
Properties:
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values.
Name | Default Value | Allowable Values | Description |
Attributes List | Comma separated list of attributes to be included in the resulting JSON. If this value is left empty then all existing Attributes will be included. This list of attributes is case sensitive. If an attribute specified in the list is not found it will be be emitted to the resulting JSON with an empty string or NULL value. | ||
Destination | flowfile-attribute | * flowfile-attribute</br> * flowfile-content | Control if JSON value is written as a new flowfile attribute 'JSONAttributes' or written in the flowfile content. Writing to flowfile content will overwrite any existing flowfile content. |
Include Core Attributes | true | * true </br> * false | Determines if the FlowFile org.apache.nifi.flowfile.attributes.CoreAttributes which are contained in every FlowFile should be included in the final JSON value generated. |
Null Value | false | * true</br> * false | 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 |
Relationships:
Name | Description |
failure | Failed to convert attributes to JSON |
success | Successfully converted attributes to JSON |
Reads Attributes:
None specified.
Writes Attributes:
Name | Description |
JSONAttributes | JSON representation of Attributes |