datetime
Classes:
-
Iso8601Serializer–A serializer for JSON data.
Attributes:
-
iso8601_serializer–Iso8601Serializer with default settings.
iso8601_serializer
module-attribute
iso8601_serializer = Iso8601Serializer()
Iso8601Serializer with default settings.
Iso8601Serializer
Bases: Serializer[datetime]
A serializer for JSON data.
Methods:
-
deserialize_config–Deserialize the configuration from a JSON string.
-
deserialize_data–Deserialize the given JSON data.
-
serialize_config–Serialize the configuration to a JSON string.
-
serialize_data–Serialize the given value to JSON.
Attributes:
-
content_types(tuple[str, ...]) –The content types that the serializer uses.
content_types
class-attribute
instance-attribute
The content types that the serializer uses.
Used to get serializers by content type in the registry.
deserialize_config
deserialize_config(config: str) -> C
Deserialize the configuration from a JSON string.
deserialize_data
deserialize_data(content: SerializedData) -> datetime
Deserialize the given JSON data.