livejson icon indicating copy to clipboard operation
livejson copied to clipboard

Support other JSON-compatible systems via DataProviders

Open controversial opened this issue 9 years ago • 0 comments

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 dict of the whole data structure, and a method for setting the data structure's contents to the contents of another dict
  • 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.

controversial avatar Jul 20 '16 21:07 controversial