Skip to content

json

Attributes:

DEFAULT_JSON_DECODER module-attribute

DEFAULT_JSON_DECODER = JSONDecoder()

The default JSON decoder used for deserialization.

DEFAULT_JSON_ENCODER module-attribute

DEFAULT_JSON_ENCODER = JSONEncoder(
    separators=(",", ":"), allow_nan=False
)

The default JSON encoder used for serialization.

JSON_TYPES module-attribute

JSON_TYPES = (
    int,
    str,
    float,
    bool,
    type(None),
    dict,
    list,
    tuple,
)

The types that can be serialized to JSON.