Nodes/Bjornulf_custom_nodes/๐Ÿ‘ Show (JSON)
ComfyUI Node

๐Ÿ‘ Show (JSON)

Pretty-print a JSON string on the canvas

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ‘ Show (JSON)
      โ—„STRINGโ–บ

      When a node hands you back a blob of JSON - generation metadata, an API response, a config dump - the raw string is a single unreadable line of braces and commas. Show (JSON) takes that string and formats it into something a human can actually scan: indented, line-broken, and tinted pink so you know at a glance what you're looking at. It's a debugging viewer, nothing more, and it's the right tool the moment your text is structured data rather than a plain prompt.

      Reach for this over the plain string viewer whenever the payload is JSON. The formatting is the entire value-add.

      How it works

      You give it a STRING that contains JSON, and it parses and re-serialises it with indentation so the structure is visible on the canvas. It's read-only - a terminal display node - so it shows the value rather than transforming it. The pack keeps a family of these type-aware viewers (Int, Float, String, JSON); the JSON one earns its own node because pretty-printing is genuinely useful when you're staring at, say, the generation_info output of one of the pack's API image nodes, or metadata pulled off an image.

      The inputs and outputs that matter

      • STRING (the only input) - the JSON text to display. Wire any node that emits a JSON string here.

      There are no outputs - this is an endpoint. It exists to be looked at, not chained through. If you need the JSON both displayed and passed onward, split the source wire into this node and into wherever the data actually needs to go.

      How to install it

      ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Or clone manually:

      cd ComfyUI/custom_nodes
      git clone https://github.com/justUmen/Bjornulf_custom_nodes
      pip install -r Bjornulf_custom_nodes/requirements.txt
      

      then restart. No special dependency - it's pure display logic and will load regardless of whether the pack's optional packages installed.

      Common issues & troubleshooting

      It shows the raw string instead of formatting it. The input has to be valid JSON for the pretty-printer to parse it. If it's malformed - a truncated API response, a string that only looks like JSON - the node can't structure what it can't parse. Check the source with the plain Show (String/Text) node to see the raw text and spot where it's broken.

      Nothing appears until I run. Same as every display node in this pack: it populates on execution. Queue the prompt.

      My data isn't actually JSON. If you're feeding it a comma-separated prompt or freeform text, use Show (String/Text) instead - this node is specifically for structured JSON, and plain text won't format meaningfully.

      The output is huge and overflows the node. Big JSON payloads (full workflow metadata, long API responses) can run past the visible area. Resize the node, or if you only need one field, extract it upstream before displaying.

      CategoryBjornulf

      Inputs (1)

      NameTypeDefaultDescription
      STRINGSTRINGโ€”

      Outputs (0)

      No outputs