JsonTableViewer
src/lib/components/ui/JsonTableViewer.svelte
Purpose
Renders an arbitrary JSON object/array as a two-column Property | Value table.
Nested objects and arrays are rendered recursively with a left border indent,
type badges (Array [n], Object {}), and array indices shown as Item N
badges. Primitive values are rendered inline; booleans render as colored
badges; null/undefined render as italic muted text. Use it to display
debug/inspection payloads — most notably inside RFCErrorDialog for the
extra.issues block of an RFC7807 error.
Origin
Custom — Primebrick-built recursive viewer. Uses the in-repo ui/table
and ui/badge primitives.
Usage
Root object
Code
Inside a bordered container
Code
The isNested prop is set automatically by the component during recursion —
you should not pass it from the outside.
Props
Full prop table: see API reference — jsontableviewer.
Key props:
data(any, required) — the JSON value to render. At the root level this should be a plain object; arrays and nested objects are handled recursively.isNested(boolean, defaultfalse) — internal flag. Whentrue, renders a CSS grid layout instead of theTable.Rootto avoid nested<table>elements. Do not set this manually.