flexget.utils.json module#
Helper module that can load whatever version of the json module is available.
Plugins can just import the methods from this module.
Also allows date and datetime objects to be encoded/decoded.
- class flexget.utils.json.DTDecoder(*, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None)[source]#
Bases:
JSONDecoder
- flexget.utils.json.coerce(obj)[source]#
Coerce a data structure to a JSON serializable form.
Will recursively go through data structure, and attempt to turn anything not JSON serializable into a string.
- flexget.utils.json.load(*args, **kwargs)[source]#
- Parameters:
decode_datetime (bool) – If True, dates in ISO8601 format will be deserialized to
datetime.datetimeobjects.- Return type:
- flexget.utils.json.loads(*args, **kwargs)[source]#
- Parameters:
decode_datetime (bool) – If True, dates in ISO8601 format will be deserialized to
datetime.datetimeobjects.- Return type: