jz Display JSON
Stop squinting at raw strings
- pretty
The moment you wire an LLM or an API node into ComfyUI, your graph starts producing JSON: caption output, structured prompts, usage summaries, whatever. And the stock way to "see" it is a text node with 300 characters of raw JSON jammed into a widget, where you parse it by eye. jz Display JSON renders that string in the node itself as a collapsible, syntax-highlighted tree - with a copy button - instead of making you squint at braces. It's an output node, and it's the debugging companion the pack's API nodes (like jz OpenRouter VLM) and your own LLM calls are begging for.
The design philosophy is worth noting because it's unusually thoughtful for a display node: invalid JSON does not kill your run. It shows a parse-error banner and renders the raw text instead. The author's comment in the source says it plainly - "it's a display node, killing the workflow over it helps nobody." Compare that to half the JSON nodes out there that raise on a stray comma, and you'll appreciate the restraint.
How it works
You wire a STRING into the text input (it's forceInput, so there's no inline widget - the node is made to receive, not type). On execution it tries to parse the string as JSON and re-serialize it with indent=2. The result is pushed to the UI, where a small frontend script (web/jz_display_json.js) renders it as a collapsible tree with highlighting and a copy button. The tree view survives save and reload - it's stored in the workflow, so you can save the graph and come back to your last inspection.
Two details that matter:
- The
prettyoutput passes the prettified string through, so you can chain it - wire it into a Save Text node to keep a formatted copy on disk, or into a later node that wants the cleaned-up JSON. The node is an output node, but it's not a dead end. - Because it's an
OUTPUT_NODE, it always runs even if nothing downstream reads its output - which is exactly what you want from a debugging tool.
When you'll actually reach for it
- Right after an API/VLM call, to inspect the raw response instead of trusting a truncated widget.
- To sanity-check that a prompt-construction node actually produced valid JSON before it feeds a parser.
- To inspect metadata or usage payloads that would otherwise scroll out of view.
It's the ComfyUI answer to "print the dict" - and given how many workflow bugs are just "the JSON was malformed," having it fail softly is a genuinely good default.
Installing it
Same pack as everything else here:
cd ComfyUI/custom_nodes
git clone https://github.com/j-zhang19/comfyui-jz
Restart ComfyUI (or Manager → search "comfyui-jz"), and it appears under jz/util. No models, no GPU; deps are just requests, pillow, numpy.
Common issues
Not much can go wrong, because the node was designed to shrug off its one failure mode. The main thing to remember: the text input is a socket, so if you try to type JSON into a widget you'll find there isn't one - wire it from whatever string node produces the JSON. And the parse-error banner is the expected behavior for invalid input, not a crash - fix the JSON upstream, don't blame the display. One more: personal pack, solo author, zero community footprint, so the README is the whole doc. For a viewer node, that's fine - the behavior is visible in the node itself.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pretty | STRING | — |