livejson
livejson copied to clipboard
Support other JSON-compatible systems via DataProviders
livejson could provide a DataProvider ABC, allowing users to bridge the livejson interface to other JSON-compatible systems, such as CouchDB, Mongo, and YAML.
A DataProvider could choose either to
- provide a method for retrieving a
dictof the whole data structure, and a method for setting the data structure's contents to the contents of anotherdict - Implement methods for all of
livejson's functionality, like getting / setting at specific indexes, setting all data, etc. This could theoretically allow much more flexibility as far as performance is concerned.
As part of this extension, livejson will be refactored to use a DataProvider for its JSON file access.
livejson will be slightly rebranded as a module for accessing JSON-like structures, rather than strictly JSON. However, only normal JSON files will be supported out of the box; I don't plan to add any more DataProviders to livejson core. Writing these will be up to the user.