A change made in NodeImpl.cc under
AVRO-1026 has introduced a bug that corrupts JSON schemas when writing them to disk or dumping to a stream. This manifested when using DataFileWriter to generate a data file, and the schema stored in the header was corrupted from the original schema provided.
Note the extraneous comma after the ‘name’ attribute.
The bug exists for Avro 'fixed' types, and has not been observed for other types. A test case will be developed.
The bug can be fixed by simply re-ordering the code in NodeFixed::printJson.