You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our JSON serialization is basically json.dumps(metadata_obj.to_dict(), ...).encode("utf-8")
json.dumps() return value does not end in a newline. This means any files written with this content will not end in a newline: this makes the produced files not valid posix text files.
For Metadata.to_file() this seems like a minor bug (and Metadata.to_bytes() should have the same output for consistency), so in practice JSONSerializer.serialize() probably should add the final newline.
My only concern about this is that it is an unexpected change in the serialization output... IF we change this, we should definitely consider this an API change for users who produce metadata.
The text was updated successfully, but these errors were encountered:
I'm worried this will break things downstream (at least all kinds of test suites in applications, maybe even actual application code)... so maybe not worth fixing unless someone is willing to do a lot of analysis/testing in the applications.
Our JSON serialization is basically
json.dumps(metadata_obj.to_dict(), ...).encode("utf-8")
json.dumps() return value does not end in a newline. This means any files written with this content will not end in a newline: this makes the produced files not valid posix text files.
For
Metadata.to_file()
this seems like a minor bug (andMetadata.to_bytes()
should have the same output for consistency), so in practiceJSONSerializer.serialize()
probably should add the final newline.My only concern about this is that it is an unexpected change in the serialization output... IF we change this, we should definitely consider this an API change for users who produce metadata.
The text was updated successfully, but these errors were encountered: