class documentation

Converter for 'json/plain' payloads supporting common Python values.

For encoding, this supports all values that json.dump supports and by default adds extra encoding support for dataclasses, classes with dict() methods, and all iterables.

For decoding, this uses type hints to attempt to rebuild the type from the type hint.

Method __init__ Initialize a JSON data converter.
Method from_payload See base class.
Method to_payload See base class.
Property encoding See base class.
Instance Variable _custom_type_converters Undocumented
Instance Variable _decoder Undocumented
Instance Variable _encoder Undocumented
Instance Variable _encoding Undocumented
def __init__(self, *, encoder: Optional[Type[json.JSONEncoder]] = AdvancedJSONEncoder, decoder: Optional[Type[json.JSONDecoder]] = None, encoding: str = 'json/plain', custom_type_converters: Sequence[JSONTypeConverter] = []): (source)

Initialize a JSON data converter.

Parameters
encoder:Optional[Type[json.JSONEncoder]]Custom encoder class object to use.
decoder:Optional[Type[json.JSONDecoder]]Custom decoder class object to use.
encoding:strEncoding name to use.
custom_type_converters:Sequence[JSONTypeConverter]Set of custom type converters that are used when converting from a payload to type-hinted values.
_custom_type_converters = (source)

Undocumented

_decoder = (source)

Undocumented

_encoder = (source)

Undocumented

_encoding = (source)

Undocumented