# `Kombu.Serialization`
[🔗](https://github.com/hacktobeer/kombu/blob/v0.1.0/lib/kombu/serialization.ex#L1)

Serializer registry and message payload encoding/decoding matching `kombu.serialization`.

# `disable`

```elixir
@spec disable(String.t()) :: :ok
```

Disable a serializer by name or content-type.

# `disable_insecure_serializers`

```elixir
@spec disable_insecure_serializers([String.t()] | :notset | nil) :: :ok
```

Disable all registered decoders except `allowed` (defaults to `["json"]`).

# `disabled_content_types`

```elixir
@spec disabled_content_types() :: MapSet.t()
```

Return the `MapSet` of currently disabled content-types.

# `dumps`

```elixir
@spec dumps(term(), String.t() | atom() | nil) :: {String.t(), String.t(), binary()}
```

Encode `data` into `{content_type, content_encoding, serialized_binary}`.

# `enable`

```elixir
@spec enable(String.t()) :: :ok
```

Enable a serializer by name or content-type.

# `enable_insecure_serializers`

```elixir
@spec enable_insecure_serializers([String.t()] | :notset | nil) :: :ok
```

Enable insecure serializers (`pickle`, `yaml`, `msgpack` by default, or given `choices`).

# `loads`

```elixir
@spec loads(term(), String.t() | nil, String.t() | nil, keyword()) :: term()
```

Decode `data` given `content_type`, `content_encoding`, and options (`:accept`, `:force`).

# `name_to_type`

```elixir
@spec name_to_type(String.t()) :: String.t() | nil
```

Returns the registered content type for a short name, or nil if not registered.

# `prepare_accept_content`

```elixir
@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.

# `raw_encode`

```elixir
@spec raw_encode(term()) :: {String.t(), String.t(), binary()}
```

Encode raw data without serialization (`kombu.serialization.raw_encode`).

# `register`

```elixir
@spec register(
  String.t() | nil,
  (term() -&gt; binary()) | nil,
  (binary() -&gt; term()) | nil,
  String.t() | nil,
  String.t()
) :: :ok
```

Register a new serializer with `name`, `encoder`, `decoder`, `content_type`, and `content_encoding`.

# `register_defaults`

Reset and register default serializers (`json` enabled by default; `yaml`, `pickle`, `msgpack`
registered as unavailable stubs matching zero-extra-dependency configuration).

# `register_json`

Register JSON serializer (`application/json`).

# `set_default_serializer`

```elixir
@spec set_default_serializer(String.t()) :: :ok
```

Set the default serializer by `name`.

# `skip_decode`

# `trusted_content`

# `type_to_name`

```elixir
@spec type_to_name(String.t()) :: String.t() | nil
```

Returns the registered short name for a content type, or nil if not registered.

# `unregister`

```elixir
@spec unregister(String.t()) :: :ok
```

Unregister a serializer by `name`. Raises `Kombu.SerializerNotInstalledError` if not found.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
