gravitino.api.types.json_serdes.type_serdes.TypeSerdes

class gravitino.api.types.json_serdes.type_serdes.TypeSerdes

Bases: JsonSerializable[Type]

Custom JSON serializer for Gravitino Type objects.

__init__()

Methods

__init__()

deserialize(data)

Deserialize the given data to a Gravitino Type.

serialize(data_type)

Serialize the given Gravitino Type.

classmethod deserialize(data: dict | list | str | int | float | bool | None) Type

Deserialize the given data to a Gravitino Type.

Args:

data (Json): The data to be deserialized.

Returns:

Type: The deserialized Gravitino Type.

classmethod serialize(data_type: Type) dict | list | str | int | float | bool | None

Serialize the given Gravitino Type.

Args:

data (Type): The Gravitino Type to be serialized.

Returns:

Json: The serialized data corresponding to the given Gravitino Type.