[
https://issues.apache.org/jira/browse/NIFI-4456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16446338#comment-16446338
]
ASF GitHub Bot commented on NIFI-4456:
--------------------------------------
Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2640#discussion_r183161985
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java
---
@@ -39,11 +39,11 @@
@Tags({"json", "tree", "record", "reader", "parser"})
@CapabilityDescription("Parses JSON into individual Record objects. The
Record that is produced will contain all top-level "
- + "elements of the corresponding JSON Object. "
- + "The root JSON element can be either a single element or an array of
JSON elements, and each "
- + "element in that array will be treated as a separate record. "
- + "If the schema that is configured contains a field that is not
present in the JSON, a null value will be used. If the JSON contains "
- + "a field that is not present in the schema, that field will be
skipped. "
+ + "elements of the corresponding JSON Objects. The reader does not
require the flow file content to be well-formed JSON; rather "
--- End diff --
I would make the same comment here as above, regarding the phrasing that
the flow file content need not be well-formed JSON.
> Update JSON Record Reader / Writer to allow for 'json per line' format
> ----------------------------------------------------------------------
>
> Key: NIFI-4456
> URL: https://issues.apache.org/jira/browse/NIFI-4456
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Matt Burgess
> Priority: Major
>
> It is common, especially for archiving purposes, to have many JSON objects
> combined with new-lines in between, in order to delimit the records. It would
> be useful to allow record readers and writers to support this, instead of
> requiring that JSON records being elements in a JSON Array.
> For example, the following JSON Is considered two records:
> {code}
> [
> { "greeting" : "hello", "id" : 1 },
> { "greeting" : "good-bye", "id" : 2 }
> ]
> {code}
> It would be beneficial to also support the format:
> {code}
> { "greeting" : "hello", "id" : 1 }
> { "greeting" : "good-bye", "id" : 2 }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)