Serializer registry and message payload encoding/decoding matching kombu.serialization.
Summary
Functions
Disable a serializer by name or content-type.
Disable all registered decoders except allowed (defaults to ["json"]).
Return the MapSet of currently disabled content-types.
Encode data into {content_type, content_encoding, serialized_binary}.
Enable a serializer by name or content-type.
Enable insecure serializers (pickle, yaml, msgpack by default, or given choices).
Decode data given content_type, content_encoding, and options (:accept, :force).
Returns the registered content type for a short name, or nil if not registered.
Replace serializer short-name aliases in content_types with full MIME content-types.
Raises Kombu.SerializerNotInstalledError if an unknown alias is given.
Encode raw data without serialization (kombu.serialization.raw_encode).
Register a new serializer with name, encoder, decoder, content_type, and content_encoding.
Reset and register default serializers (json enabled by default; yaml, pickle, msgpack
registered as unavailable stubs matching zero-extra-dependency configuration).
Register JSON serializer (application/json).
Set the default serializer by name.
Returns the registered short name for a content type, or nil if not registered.
Unregister a serializer by name. Raises Kombu.SerializerNotInstalledError if not found.
Functions
@spec disable(String.t()) :: :ok
Disable a serializer by name or content-type.
@spec disable_insecure_serializers([String.t()] | :notset | nil) :: :ok
Disable all registered decoders except allowed (defaults to ["json"]).
@spec disabled_content_types() :: MapSet.t()
Return the MapSet of currently disabled content-types.
Encode data into {content_type, content_encoding, serialized_binary}.
@spec enable(String.t()) :: :ok
Enable a serializer by name or content-type.
@spec enable_insecure_serializers([String.t()] | :notset | nil) :: :ok
Enable insecure serializers (pickle, yaml, msgpack by default, or given choices).
Decode data given content_type, content_encoding, and options (:accept, :force).
Returns the registered content type for a short name, or nil if not registered.
@spec prepare_accept_content(Enumerable.t() | nil, map() | nil) :: MapSet.t() | nil
Replace serializer short-name aliases in content_types with full MIME content-types.
Raises Kombu.SerializerNotInstalledError if an unknown alias is given.
Encode raw data without serialization (kombu.serialization.raw_encode).
@spec register( String.t() | nil, (term() -> binary()) | nil, (binary() -> term()) | nil, String.t() | nil, String.t() ) :: :ok
Register a new serializer with name, encoder, decoder, content_type, and content_encoding.
Reset and register default serializers (json enabled by default; yaml, pickle, msgpack
registered as unavailable stubs matching zero-extra-dependency configuration).
Register JSON serializer (application/json).
@spec set_default_serializer(String.t()) :: :ok
Set the default serializer by name.
Returns the registered short name for a content type, or nil if not registered.
@spec unregister(String.t()) :: :ok
Unregister a serializer by name. Raises Kombu.SerializerNotInstalledError if not found.