# `ExMqtt.Protocol.Properties`
[🔗](https://github.com/Ultraluv/ex_mqtt_uv/blob/v0.1.0/lib/ex_mqtt/protocol/properties.ex#L1)

MQTT 5.0 Properties serialization, deserialization, value-range validation,
and per-packet allowlist validation.

# `decode`

```elixir
@spec decode(binary(), atom()) :: {:ok, map(), binary()} | {:error, term()}
```

Decodes an MQTT 5.0 Properties section from the front of `binary`.

# `encode`

```elixir
@spec encode(map(), atom()) :: {:ok, iodata()} | {:error, term()}
```

Encodes a map of properties for the given `context` (e.g. `:connect`, `:publish`, `:will`)
prefixed by its Variable Byte Integer property length.

---

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