quart.json.tag module

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

Bases: object

check(value: Any) → bool
key: Optional[str] = None
tag(value: Any) → Any
to_json(value: Any) → Any
to_python(value: str) → Any
class quart.json.tag.PassDict(serializer: 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: 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: TaggedJSONSerializer)

Bases: quart.json.tag.JSONTag

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

Bases: quart.json.tag.JSONTag

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

Bases: quart.json.tag.JSONTag

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

Bases: quart.json.tag.JSONTag

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

Bases: quart.json.tag.JSONTag

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

Bases: quart.json.tag.JSONTag

check(value: Any) → bool
key: Optional[str] = ' 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