Daniel Stieglitz created NIFI-13963:
---------------------------------------

             Summary: Unknown fields not dropped by JSON Writer as expected by 
specified schema
                 Key: NIFI-13963
                 URL: https://issues.apache.org/jira/browse/NIFI-13963
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.28.0, 1.27.0, 1.26.0
            Reporter: Daniel Stieglitz
            Assignee: Daniel Stieglitz


This is a back port of the fix introduced in NIFI-13843 for 2.x. This bug 
apparently was introduced in 1.26.0 in NIFI-13090 (which was a back port of 
NIFI-12480 for 2.x) with the changes to _AbstractJsonRowRecordReader_ in method 
_createRecordFromRawValue_ which included a serialized form of the schema even 
with unknown fields with the following lines: 
{code:java}
       final SerializedForm serializedForm = 
SerializedForm.of(fieldNode::toString, "application/json");
        return new MapRecord(childSchema, childValues, serializedForm);
    }{code}
Apparently the _WriteJsonResult_ always had ability to write out the serialized 
form of the JSON but it seems it never did since the 
_AbstractJsonRowRecordReader_ never returned a serialized form of the JSON 
until 1.26.0. This explains how [~mosermw] in a comment on NIFI-13843 was able 
to see no issues when using nifi-record-serialization-services-nar-{*}1.25.0{*} 
for JsonTreeReader and nifi-record-serialization-services-nar-{*}1.26.0{*} for 
JsonRecordSetWriter but only saw issues when with 
nifi-record-serialization-services-nar-{*}1.26.0{*} for JsonTreeReader and 
nifi-record-serialization-services-nar-{*}1.26.0{*} for JsonRecordSetWriter



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to