AttributesToJSON 2025.10.2.19¶
捆绑包¶
org.apache.nifi | nifi-standard-nar
描述¶
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. Attributes which contain nested JSON objects can either be handled as JSON or as escaped JSON depending on the strategy chosen.
输入要求¶
REQUIRED
支持敏感的动态属性¶
false
属性¶
属性 |
描述 |
|---|---|
属性清单 |
要包含在生成的 JSON 中的属性列表,以逗号分隔。如果将此值留空,则会包括所有现有属性。此属性列表区分大小写。如果找不到列表中指定的属性,则该属性将以空字符串或 NULL 值发送给生成的 JSON。 |
目标 |
控制 JSON 值是作为新的 Flowfile 属性“JSONAttributes”写入还是在 Flowfile 内容中写入。写入 Flowfile 内容将覆盖任何现有的 Flowfile 内容。 |
Include Core Attributes |
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. |
JSON Handling Strategy |
用于处理包含嵌套 JSON 的属性的策略。 |
Null Value |
如果为 true,则不存在的选定属性在生成的 JSON 中将为 NULL。如果为 false,则将空字符串放置在 JSON 中 |
Pretty Print |
将 Pretty Print 格式应用于输出。 |
attributes-to-json-regex |
将根据 FlowFile 属性进行求值,以选择与属性相匹配的正则表达式。此属性可以与属性列表属性组合使用。 |
关系¶
名称 |
描述 |
|---|---|
failure |
将属性转换为 JSON 失败 |
success |
将属性转换为 JSON 成功 |
写入属性¶
名称 |
描述 |
|---|---|
JSONAttributes |
属性的 JSON 表示 |