Parse JSON 🔽
Turn a JSON string into a real dict inside a ComfyUI graph
- DICT
ComfyUI speaks in strings and tensors, and sometimes the string you have is a JSON document - an API response, a config block, a workflow variable serialized as text. This node parses a JSON string into an actual DICT you can wire onward. It's dead simple: one input, one output, no API calls, no network.
It lives in the ComfyUI Telegram Suite pack under the experimental category, alongside the pack's more ambitious API Method node. If you use the suite's other nodes, DICT is a type you'll run into a lot - the send and edit nodes return message payloads as DICTs - and this is the node that gets JSON into that form.
How it works
It's a thin wrapper around Python's json.loads. You feed it a JSON string, it parses, and the result comes out the DICT output. That's the entire mechanism - which is exactly what you want from a converter: boring, predictable, no hidden behavior.
The one thing to know: it expects valid JSON, and it's strict about it. A trailing comma, single quotes instead of double quotes, or a comment will throw a parse error. If you're pasting JSON from somewhere that isn't a real JSON emitter, that's the failure mode you'll hit.
Inputs and outputs that matter
json_string(multiline STRING) - the JSON document as text. You can type it directly or wire it from another text source.- Output:
DICT- the parsed object. Feed it into nodes that take aDICTinput, or intoAPIMethod'sparamsinput if you're calling a Telegram API method with a structured payload.
Installation
Shared with the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/SwissCore92/comfyui-telegram-suite.git
cd comfyui-telegram-suite
pip install -r requirements.txt
or install "ComfyUI Telegram Suite" via ComfyUI Manager and restart. Then add bot tokens and chat IDs to ComfyUI/user/default/telegram-suite/config.json and restart once more. No models, no ffmpeg dependency here - this node is pure standard-library parsing.
Troubleshooting
- Parse errors on valid-looking JSON - check for the usual strict-JSON traps: double quotes (not single), no trailing commas, no comments.
DICTsocket not connecting - the output is typedDICT, so it only plugs into sockets that acceptDICT(orANY). If the target node wantsSTRING, you'd need to serialize, not parse.- This node is flagged
experimentalby the author, so it's more likely to change than the core send/edit nodes - fine for a utility, just don't build an empire on its exact API.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| json_string | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | — |