# `ToonEx.Decode.Options`
[🔗](https://github.com/ohhi-vn/toon_ex/blob/v1.1.0/lib/toon_ex/decode/options.ex#L1)

Validation and normalization of decoding options.

# `schema`

```elixir
@spec schema() :: keyword()
```

Returns the options schema.

# `validate`

```elixir
@spec validate(keyword()) :: {:ok, map()} | {:error, ToonEx.Options.Validator.t()}
```

Validates and normalizes decoding options.

## Examples

    iex> ToonEx.Decode.Options.validate([])
    {:ok, %{keys: :strings, strict: true, indent_size: 2}}

    iex> ToonEx.Decode.Options.validate(keys: :atoms)
    {:ok, %{keys: :atoms, strict: true, indent_size: 2}}

    iex> match?({:error, _}, ToonEx.Decode.Options.validate(keys: :invalid))
    true

# `validate!`

```elixir
@spec validate!(keyword()) :: map()
```

Validates and normalizes decoding options, raising on error.

---

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