class documentation
class Serializer(Protocol):
Serializer is used by the framework to serialize/deserialize input and output.
Method | deserialize |
Deserialize decodes a Content into a value. |
Method | serialize |
Serialize encodes a value into a Content. |
def deserialize(self, content:
Content
, as_type: type[ Any] | None
= None) -> Any | Awaitable[ Any]
:
¶
Deserialize decodes a Content into a value.
Parameters | |
content:Content | The content to deserialize. |
astype[ | The type to convert the result of deserialization into. Do not attempt type conversion if this is None. |
Returns | |
Any | Awaitable[ | Undocumented |