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.
Summary
Functions
Prints JSON to stdout with syntax highlighting.
@spec render( term(), keyword() ) :: Alaja.Buffer.t()
Renders JSON to an Alaja.Buffer.t/0.