betty.serializers.json module

The JSON serializer.

final class betty.serializers.json.Json

Bases: Serializer

The json serializer plugin.

Plugin ID

json

Class

Json

Configuration

not configurable

dump(portable: PortableData, /) str

Serialize data.

load(serialized: str, /) PortableData

Deserialize data.

Raises:

SerializationError – Raised when the dump could not be loaded.

classmethod media_type() MediaType

The media type this serializer can serialize.