gravitino.api.stats.json_serdes.statistic_value_serdes.StatisticValueSerdes¶
- class gravitino.api.stats.json_serdes.statistic_value_serdes.StatisticValueSerdes¶
Bases:
JsonSerializable[StatisticValue[Any]]Customized JSON Serializer and Deserializer for StatisticValue.
- __init__()¶
Methods
__init__()deserialize(data)Deserialize the given data to a StatisticValue.
serialize(value)Serialize the given StatisticValue.
- classmethod deserialize(data: dict | list | str | int | float | bool | None) StatisticValue[Any]¶
Deserialize the given data to a StatisticValue.
- Args:
data (Json): The data to be deserialized.
- Returns:
StatisticValue[Any]: The deserialized StatisticValue.
- classmethod serialize(value: StatisticValue[Any]) dict | list | str | int | float | bool | None¶
Serialize the given StatisticValue.
- Args:
value (StatisticValue): The StatisticValue to be serialized.
- Returns:
Json: The serialized data corresponding to the given Gravitino Type.