# `DocShell.Json.Depth`
[🔗](https://github.com/futhr/doc_shell/blob/v2.0.0/lib/doc_shell/json/depth.ex#L1)

Bounds JSON container nesting before decoding allocates a native tree.

The scanner searches original syntax bytes while skipping quoted strings and
escapes. It allocates no decoded values and makes no network or filesystem
call. A passing result is only a depth check: malformed JSON, duplicate keys
and value types remain the decoder's responsibility.

# `check`

```elixir
@spec check(binary(), pos_integer()) :: :ok | {:error, term()}
```

Checks a binary against an explicit positive container-depth ceiling.

---

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