Feature/save load subnet map
- Modified the Import/Export modal to add two additional buttons Load and Save. This will enable users to load or save a submap JSON stored locally. (This could be within a git repository)
- allow fallback for browsers that do not support the File System Access API
- Imported the agv schema validator library https://ajv.js.org/
- Added a json schema to validate any json to be imported.
This closes issue #7
@ckabalan The Json Schema validation might be overkill considering that the path to loading a json locally will likely be generated from the browser and saved locally and therefore valid. If you feel that validation adds value then there are also additional validations that could be added in the future and not just the Json Schema. I believe that the feature is complete enough for MVP.
I've tested the Json schema against various generated json subnet maps including invalid ones. The error messages generated from the AJV library aren't that user-friendly but they do highlight where the issue lies within the Json schema.
@ckabalan is this still being worked on? This would be an awesome feature to have.
I'll take a deep look at this tonight. Thanks for keeping me accountable!
Would be nice to have it