utilities.customjsonencoder module

class utilities.customjsonencoder.CustomJSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)

Bases: json.encoder.JSONEncoder

A custom JSON encoder to additionally encode some objects defined in this project.

default(obj)

Encode the object in JSON.

Parameters:obj – The object to encode
Returns:The JSON encoding of the object