biometrics_tracker.config.json_handler module

class biometrics_tracker.config.json_handler.ConfigJSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)

Bases: JSONEncoder

Implements a custom json.JSONEncoder to encode instances of ConfigInfo, ImportSpecs and ExportSpecs

default(obj: Any)

This method is invoked to handle data types that can’t be handled by the standard JSONEncoder

Parameters

obj

Returns

Any

biometrics_tracker.config.json_handler.config_object_hook(obj_dict: dict)

A custom object hook function to handle the decoding of JSON representations of ConfigInfo, ImportSpecs and ExportSpecs

Parameters

obj_dict (dict[str, str]) – a dict containing JSON names and values

Returns

an instance of the appropriate class (e.g. ConfigInfo, ImportSpecs, etc)

Return type

Union[ConfigInfo, ImportSpecs, ExportSpecs, PluginMenu, PluginMenuItem]