quart.json.tag module

class quart.json.tag.JSONTag(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: object

check(value: Any) → bool
key = None
tag(value: Any) → Any
to_json(value: Any) → Any
to_python(value: str) → Any
class quart.json.tag.PassDict(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
tag(value: Any) → Dict[str, Any]
to_json(value: Any) → Dict[str, Any]
class quart.json.tag.PassList(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
tag(value: List[Any]) → List[Any]
to_json(value: List[Any]) → List[Any]
class quart.json.tag.TagBytes(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key = ' b'
to_json(value: bytes) → str
to_python(value: str) → bytes
class quart.json.tag.TagDateTime(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key = ' d'
to_json(value: datetime.datetime) → str
to_python(value: str) → datetime.datetime
class quart.json.tag.TagDict(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key = ' di'
to_json(value: Any) → Dict[str, Any]
to_python(value: str) → Dict[str, Any]
class quart.json.tag.TagMarkup(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key = ' m'
to_json(value: Any) → str
to_python(value: str) → markupsafe.Markup
class quart.json.tag.TagTuple(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key = ' t'
to_json(value: Tuple[Any]) → List[Any]
to_python(value: Any) → Tuple[Any, ...]
class quart.json.tag.TagUUID(serializer: quart.json.tag.TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key = ' u'
to_json(value: Any) → str
to_python(value: str) → uuid.UUID
class quart.json.tag.TaggedJSONSerializer

Bases: object

default_tags = [<class 'quart.json.tag.TagDict'>, <class 'quart.json.tag.PassDict'>, <class 'quart.json.tag.TagTuple'>, <class 'quart.json.tag.PassList'>, <class 'quart.json.tag.TagBytes'>, <class 'quart.json.tag.TagMarkup'>, <class 'quart.json.tag.TagUUID'>, <class 'quart.json.tag.TagDateTime'>]
dumps(value: Any) → str
loads(value: str) → Any
register(tag_class: Type[quart.json.tag.JSONTag], force: bool = False, index: Optional[int] = None) → None
tag(value: Any) → Dict[str, Any]
untag(value: Dict[str, Any]) → Any