Skip to content

Support other JSON-compatible systems via DataProviders #13

@controversial

Description

@controversial

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions