JSON Chain String Pair (Soze)
The building block of the Soze JSON chain
- chain_in
- chain_out
Every workflow that talks to an API eventually needs to build a JSON object, and hand-typing JSON into a text box inside ComfyUI is a recipe for a broken payload. JSON Chain String Pair (Soze) is the smallest piece of the fix: one name: value pair, appended to a chain that a whole family of Soze nodes pass between themselves. You wire a string in, type the key, and the JSON comes out correct at the end - quotes, escaping and all.
It's the node you'll reach for constantly once you're building structured payloads for API nodes like ComfyDeploy or FAL, or generating a JSON file to feed into a CSV-driven batch job. The killer property is that the value is a live connection, not a frozen string: change the upstream node and the JSON updates on the next run. No editing a blob of text in a tiny box.
How it works
The Soze JSON family communicates over a custom type called JSON_PAIRS - internally a list of (key, value) tuples flowing from one pair node to the next. Each pair node takes the previous chain in through chain_in, appends its own name: value, and hands a brand-new list out through chain_out. The chain never mutates in place, so you can branch it freely. A blank name is silently skipped, which means a half-configured node is harmless rather than an error.
Two details matter. First, the value input uses forceInput - there's no inline widget, you must wire something in, and it's deliberately a multiline string so long prompts fit. Second, name is a plain widget you type into. So the mental model is: key on the node, value on the wire.
Inputs and outputs
- name - required string, the JSON key. Multiline off.
- value - required STRING input you wire from any text source (a prompt box, a CSV Reader, another string node).
- chain_in - optional. Connect the previous pair node's
chain_outhere. Leave it empty to start a new chain.
Output is a single chain_out socket of type JSON_PAIRS. The classic pattern:
String Pair("name", "Alice") → String Pair("role", "hero") → JSON Generate
gives you {"name":"Alice","role":"hero"}.
Installing it
Part of the Soze pack:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
Restart ComfyUI. ComfyUI Manager users can search ComfyUI_Soze instead. No models, no keys - the JSON nodes are pure Python with no extra dependencies beyond what the pack already installs.
Where people get tripped up
The most common confusion is expecting to type the value into the node. You can't - it's a forced input, which is a deliberate design choice so values can come from anywhere in your graph. If you want the old-style "type both name and value" ergonomics, the JSON Chain String Pairs (10X) node has plain text widgets for exactly that. Also: duplicate keys are allowed and the last one wins, standard dict behavior, and JSON Generate reports it in its status output - so if you're chasing a missing field, glance at that status string first.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | — | |
| value | STRING | — | |
| chain_inopt | JSON_PAIRS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| chain_out | JSON_PAIRS | — |