# `Alaja.Components.Json`
[🔗](https://github.com/Lorenzo-SF/alaja/blob/2.1.0/lib/alaja/components/json.ex#L1)

Static JSON pretty-printer with syntax highlighting for terminal output.

Renders JSON with ANSI colors differentiated by value type.

## Usage

    iex> Alaja.Components.Json.print(%{name: "Alaja", version: "1.0.0"})

## Cell engine

As of v0.3.0, `render/2` returns an `Alaja.Buffer.t/0`. Each line
becomes one row; multi-line JSON (objects, arrays) become multi-row
buffers. Each character is placed with the colour matching its
JSON token type.

## Theme integration (v2.0.0+)

When no `:key_color` / `:string_color` / etc. are supplied, the
defaults are `theme:quaternary`, `theme:success`, `theme:info`,
`theme:ternary`, `theme:sad`, `theme:no_color` — they resolve
through `Pote.Orchestrator.parse_color/1` so the active theme
picks them up. Pass an RGB tuple, hex string, or atom to override.

# `print`

```elixir
@spec print(
  term(),
  keyword()
) :: :ok
```

Prints JSON to stdout with syntax highlighting.

# `render`

```elixir
@spec render(
  term(),
  keyword()
) :: Alaja.Buffer.t()
```

Renders JSON to an `Alaja.Buffer.t/0`.

---

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