openpectus.aggregator.routers.serialization
Attributes
Functions
|
Serialize a dto message in a round-trippable fashion. |
|
Deserializes a dto message to the proper concrete BaseModel subtype. |
|
Module Contents
- openpectus.aggregator.routers.serialization.namespace_name = 'openpectus.aggregator.routers.dto'
- openpectus.aggregator.routers.serialization.namespace_types
- openpectus.aggregator.routers.serialization.serialize(msg)
Serialize a dto message in a round-trippable fashion.
- Parameters:
msg (pydantic.BaseModel)
- Return type:
dict[str, Any]
- openpectus.aggregator.routers.serialization.deserialize(json_dict)
Deserializes a dto message to the proper concrete BaseModel subtype.
Supports messages serialized to dict by the serialize() function.
- Parameters:
json_dict (dict[str, Any])
- Return type:
pydantic.BaseModel
- openpectus.aggregator.routers.serialization.try_get_ctor_from_namespace(type_name, namespace)
- Parameters:
type_name (str)