CustomDecoder
CustomDecoder#
- class CustomDecoder(*args, **kwargs)[source]#
Bases:
json.decoder.JSONDecoder
Decoder for JSON with methods for datetimes
- decode(s, _w=<built-in method match of re.Pattern object>)#
Return the Python representation of
s
(astr
instance containing a JSON document).
- raw_decode(s, idx=0)#
Decode a JSON document from
s
(astr
beginning with a JSON document) and return a 2-tuple of the Python representation and the index ins
where the document ended.This can be used to decode a JSON document from a string that may have extraneous data at the end.