Display JSON
See the JSON on the wire without reaching for a text node
- json_input
- ui_widget
- json
JSON is everywhere in modern ComfyUI - LLM responses, API payloads, model metadata, the workflow file itself - and it's the worst thing to debug blind. A JSON wire tells you nothing until you can actually read the object. LF_DisplayJSON is the LF Nodes answer: feed it a json_input, and it renders the object in a code-style widget on the node body so you can read exactly what's flowing through.
It's the terminal node of the pack's JSON trio: LF_SetValueInJSON builds objects, LF_GetValueFromJSON pulls values out, and this one shows you the whole thing when you need to verify the result. The author's own workflows lean on this pattern - assemble structured data, then display it before sending it anywhere, so a wrong value never travels quietly.
How to use it
Wire any JSON-producing node into json_input - an LLM's response_json, a LF_SetValueInJSON result, a loaded config - and after a run the object appears pretty-printed on the node. It's an output node, so it sits at the end of a branch as a readout; it passes the JSON through on the json output unchanged, so you can also inline it as a waypoint if you want a guaranteed read of the value between two stages.
The realistic debugging flow: your LF_GetValueFromJSON keeps returning empty → put a LF_DisplayJSON on the object feeding it → spot the typo'd key or the nested structure you forgot → fix and re-run. Without the display node, that's guesswork.
What it's not
It doesn't validate, pretty-print for export, or convert to a string you can paste into a prompt. It's a visual readout. For "give me this object as text," that's a different node - this one is for your eyes on the canvas.
Installing it
Part of the LF Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/comfyui-lf
or ComfyUI Manager → LF Nodes → install → restart. No dependencies, no models. The pack is the frozen legacy repo (development moved to lf-nodes), so this node is exactly as last shipped - stable and simple.
Where people get burned
- It only renders after a run. An empty node body before you queue is normal, not a wiring failure.
- Expecting editable JSON. This is display-only; if you want to modify the object, that's
LF_SetValueInJSON's job further upstream. - Reading a huge object on a small node. The code widget scrolls, but for giant payloads, use
LF_GetValueFromJSONto pull the one field you actually care about.
When structured data goes wrong, this is the node that turns "I wonder what's in there" into "there it is, typo and all."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| json_input | JSON | JSON object to display. | |
| ui_widgetopt | KUL_CODE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json | JSON | — |