Module zut.json

Write and read JSON using extended encoder and decoder.

Functions

decode_json(data, *, cls)

Decode a JSON string and return the corresponding Python object.

dump_json(data, file, *, indent[, ...])

Dump a Python object into a file in JSON format.

dump_json_temp(data, *[, encoding, ...])

Dump a Python object into a temporary file in JSON format and return a context manager on the path to the temporary file.

encode_json(data, *, indent[, sort_keys, ...])

Encode a Python object into a JSON string and return it.

load_json(file, *[, encoding])

Load a file containing JSON string and return the corresponding Python object.

Classes

ExtendedJSONDecoder(*[, object_hook])

ExtendedJSONEncoder(**kwargs)

Adapted from: django.core.serializers.json.DjangoJSONEncoder