Adaptor for reading and writing any generic JSON file.

This is a good example of a very simple adaptor class.

property all_exts

List of all file extensions supported by adaptor.


Returns whether this adaptor can read this file.

can_write_filename(filename: str)bool[source]

Returns whether this adaptor can write format of this filename.

property default_ext

The default file extension, e.g., ‘json’ (without ‘.’).


Returns whether this adaptor supports reading.


Returns whether this adaptor supports writing.

property handles

Returns the type of object that can be read/written.

The Dispatch class calls this method on all registered adaptors to determine which to use for reading/writing.

property name

Human-reading name of the file format

read(file:, *args, **kwargs)[source]

Reads the file and returns the appropriate deserialized object.

write(filename: str, source_object: dict)[source]

Writes the object to a file.