# `PhoenixKit.Utils.Json`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v2.13.11/lib/phoenix_kit/utils/json.ex#L1)

Thin helper around Elixir's built-in `JSON` module (1.18+) for the one
thing it doesn't provide: pretty-printing.

PhoenixKit's own code uses the built-in `JSON` module directly for plain
encode/decode — this module exists only for the handful of call sites
(JSON shown back to an admin in a textarea, or in a debug view) that need
indented output.

# `encode_pretty!`

```elixir
@spec encode_pretty!(term()) :: String.t()
```

Encodes `term` as indented, human-readable JSON (2-space indent).

## Examples

    iex> PhoenixKit.Utils.Json.encode_pretty!(%{"a" => 1})
    ~s({\n  "a": 1\n})

---

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