class PydanticJSONPlainPayloadConverter(EncodingPayloadConverter): (source)
Constructor: PydanticJSONPlainPayloadConverter(to_json_options)
Pydantic JSON payload converter.
Supports conversion of all types supported by Pydantic to and from JSON.
In addition to Pydantic models, these include all json.dump
-able types,
various non-json.dump
-able standard library types such as dataclasses,
types from the datetime module, sets, UUID, etc, and custom types composed
of any of these.
See https://docs.pydantic.dev/latest/api/standard_library_types/
Method | __init__ |
Create a new payload converter. |
Method | from |
See base class. |
Method | to |
See base class. |
Property | encoding |
See base class. |
Instance Variable | _schema |
Undocumented |
Instance Variable | _to |
Undocumented |
temporalio.api.common.v1.Payload
, type_hint: type | None
= None) -> Any
:
(source)
¶
See base class.
Uses pydantic.TypeAdapter.validate_json to construct an instance of the type specified by type_hint from the JSON payload.
See https://docs.pydantic.dev/latest/api/type_adapter/#pydantic.type_adapter.TypeAdapter.validate_json.
See base class.
Uses pydantic_core.to_json to serialize value to JSON.
See https://docs.pydantic.dev/latest/api/pydantic_core/#pydantic_core.to_json.