What is the project's stance on backwards compatible save files?
Subject of the issue
I wanted to know if the project has a stance on backwards compatibility with regards to the saved files (serialized grids)? If not, then I guess the best workaround is to save a version number with the saved files and then migrate from version to version. If this is the case, would that that contribution be of interest?
On a related point, would a JSON Schema definition make sense?
Your environment
- version: 8-9
I've left versioning to application as typically you will save bunch of extra info in there as well, and trivial for app to save a revision and convert if they care about old format.
not sure I would want the bloat in this lib to support every format since I implemented the save()/load() function to be honest... what fields are you worry about ? JSON schema might make sense - right now it is in a TS definition GridStackOptions
Good to know. Then I'll just version the saved JSON and if an incompatibility pops up deal with it in application via a migration function.
The TS definition is more than enough and if required, can also be used to generate JSON Schema.
that said if you want to have GridStackOptions have a version field as well and write convertion from older format and doesn't look like a lot of work/bloat, then I'm open to it. this would only work going forward as we don't have old fomat versions.
That has the potential to be very useful.
- How would the version number be accessible from the library. As far as I can tell, it isn't integrated in the bundled library
- How would it be saved in the JSON save() returns as currently it returns a list
it would only work in the GridStackOptions case where a new field would be added.
closing since no donation for that work.