Nodes/ComfyUI-LogicUtils/Pyobjects/PyStructure -> JSON
ComfyUI Node

Pyobjects/PyStructure -> JSON

Dump whatever's actually inside a socket to text

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Pyobjects/PyStructure -> JSON
  • py_obj
  • STRING
indent0

This is the "let me actually see what's in here" node. ComfyUI's wildcard * sockets are convenient right up until something goes wrong inside them and you have no way to inspect the value - a dict from a GlobalVar node, a list a loop is passing around, a nested structure some other custom node handed you. This one takes any of that and turns it into a plain JSON string via json.dumps, which you can then route into a Show Text node, a Save Text node, or just eyeball in the queue log.

It's a debugging node more than a production one, and that's exactly its value. Instead of guessing why a downstream node is choking on a value, you drop this in the middle of the wire, run once, and read exactly what's flowing through - keys, types, nesting, the works.

How it works

py_obj accepts the flexible * type, so you can plug in anything a Python object could be: strings, numbers, lists, dicts, nested combinations of those - the kind of data LogicUtils' own GlobalVar* nodes traffic in. It runs json.dumps on it and hands back a STRING. One caveat worth being upfront about: JSON only knows how to serialize plain data. Wire in something that isn't - an IMAGE tensor, a loaded MODEL, a raw Python object with no JSON representation - and you should expect an error or a useless dump rather than a clean result. This node is built for the data side of your graph, not the tensor side.

Inputs and outputs

  • py_obj - anything, on the wildcard * input.
  • indent (default 0) - leave it at 0 for compact single-line JSON, or bump it up (2 or 4 are typical) for pretty-printed, multi-line output that's much easier to read in a preview box.

Output is a STRING - the JSON dump.

Installing ComfyUI-LogicUtils

ComfyUI Manager: Install Custom Nodes → search "ComfyUI-LogicUtils" → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils

Restart ComfyUI. No extra dependencies - json is standard-library Python.

Worth knowing

Pairs naturally with LogicUtils' own GlobalVar* nodes: set or load a value into the global store, then dump it here to confirm it's what you think it is before you build the rest of your graph around it. The pack is aria1th's (AngelBottomless's) side project of utility nodes - barely documented by its own admission, and quiet since public pushes stopped in January 2026 - but it got a genuine nod on r/StableDiffusion the same month as the lightweight, dependency-free option when someone just needed one small utility node without installing a heavier pack. A debug-dump node like this is exactly the kind of thing that fits that reputation: it does one small job, does it with zero setup, and isn't going to break because there's almost nothing to break.

CategoryData

Inputs (2)

NameTypeDefaultDescription
py_obj*
indentoptINT0

Outputs (1)

NameTypeDescription
STRINGSTRING