class documentation

Base class for defining type tags for :class:`TaggedJSONSerializer`.

Method __init__ Create a tagger for the given serializer.
Method check Check if the given value should be tagged by this tag.
Method tag Convert the value to a valid JSON type and add the tag structure around it.
Method to_json Convert the Python object to an object that is a valid JSON type. The tag will be added later.
Method to_python Convert the JSON representation back to the correct type. The tag will already be removed.
Class Variable __slots__ Undocumented
Class Variable key Undocumented
Instance Variable serializer Undocumented
def __init__(self, serializer: TaggedJSONSerializer): (source)

Create a tagger for the given serializer.

def tag(self, value: t.Any) -> t.Any: (source)

Convert the value to a valid JSON type and add the tag structure around it.

def to_json(self, value: t.Any) -> t.Any: (source)

Convert the Python object to an object that is a valid JSON type. The tag will be added later.

def to_python(self, value: t.Any) -> t.Any: (source)

Convert the JSON representation back to the correct type. The tag will already be removed.

serializer = (source)

Undocumented