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
Originally posted by felixchenier May 24, 2022
At the moment, ktk.zip files are zipped JSON files for two reasons:
Space. JSON files are much smaller once zipped.
Ability to have a separate JSON file for metadata, which includes the file version number. This makes it possible to "easily" switch the file format in the future, to an hypothetical non-JSON format, while preserving the metadata in a JSON file.
However :
In case someone accidentally unzips the ktk.zip without realizing that the .zip is the expected file format (this is a real-life scenario), it would be practical if ktk.load could load a data JSON file directly.
For portability and easiness of sharing data with other programs, it may be useful that ktk.save can save to one data JSON file. This would be a non-default option.
Just an idea.
The text was updated successfully, but these errors were encountered:
I think it makes sense to flatten it to a single zipped JSON file, as expected by the documentation. This way we would automate the zipping/unzipping but it would be transparent and non required. Using the option zip=True in ktk.save would generate a zipped json file, and zip=False would generate a json file.
At the moment, ktk.zip files are zipped JSON files for two reasons:
Space. JSON files are much smaller once zipped
This is not affected.
Ability to have a separate JSON file for metadata, which includes the file version number. This makes it possible to "easily" switch the file format in the future, to an hypothetical non-JSON format, while preserving the metadata in a JSON file.
This is still really affected. We could come back to another format in the future that would not be a JSON file and in this file, supporting a dual metadata/data approach would still make sense. We need to continue supporting this form anyway since KTK has been used in real life now. The method would be simply to check if the unzipped file is a JSON, and if it is, load it including the metadata. If it's a folder, load it using the previous method.
Discussed in #92
Originally posted by felixchenier May 24, 2022
At the moment, ktk.zip files are zipped JSON files for two reasons:
However :
Just an idea.
The text was updated successfully, but these errors were encountered: