class documentation

class TagMarkup(JSONTag): (source)

View In Hierarchy

Serialize anything matching the :class:`~markupsafe.Markup` API by having a ``__html__`` method to the result of that method. Always deserializes to an instance of :class:`~markupsafe.Markup`.

Method check Check if the given value should be tagged by this tag.
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

Inherited from JSONTag:

Method __init__ Create a tagger for the given serializer.
Method tag Convert the value to a valid JSON type and add the tag structure around it.
Instance Variable serializer Undocumented
def check(self, value: t.Any) -> bool: (source)

Check if the given value should be tagged by this tag.

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.