CDA JSON Create
The glue that turns typed JSON into pack-ready input
- STRING
CDA JSON Create is the node that answers the pack's weirdest question: where do lists come from? ComfyUI has no native list widget, yet several Data-Analysis nodes demand PYLIST inputs - lists of values, lists of indices, lists of row positions. This node is the bridge: you type JSON into a multiline field, it validates and reserializes it, and out comes a string that the list sockets accept. It's not glamorous, but half the pack's examples quietly depend on it.
It belongs to the CDA (ComfyUI Data Analysis) family in HowToSD's ComfyUI-Data-Analysis pack. The user guide is explicit about its role: "if you want to create a list for a node that requires a list of integers for input, this node is ideal." That's the whole pitch - it's the list constructor for the graph.
How it works
The implementation is a JSON round-trip: json.loads(data) then json.dumps(...). Your text is parsed as JSON, then re-serialized to a normalized string. That round-trip does two things: it validates - malformed JSON raises a clear error instead of failing somewhere mysterious downstream - and it canonicalizes, so formatting differences vanish. The output rides out on a STRING socket.
Here's the key nuance: the output type in the schema is STRING. The pack's PYLIST-socket nodes accept this JSON string because that's the established convention - JSON text is how you represent a list in this pack. You're not getting a native Python list object out of the socket; you're getting a serialized one that the pack knows how to consume.
Inputs and outputs
- data (required,
STRING, multiline) - a JSON document:[1, 2, 3],["Jan","Feb"], or even{"a": 1}. - STRING output - the validated, re-serialized JSON string.
The pattern that matters
The flagship use: feeding Pandas Create Series From List Index List. That node needs two PYLIST inputs - one of values, one of labels. Both come from CDA JSON Create nodes:
- CDA JSON Create with
[1.2, 3.4, 5.6]→data. - CDA JSON Create with
["A","B","C"]→index.
Same trick feeds Pandas Iloc Rows DataFrame (a list of row positions) and any other PYLIST consumer in the pack. If a node wants a list and you're stuck, CDA JSON Create is almost certainly the intended source.
Installing it
Standard pack install. ComfyUI Manager: search "Data analysis", install ComfyUI-Data-Analysis, restart, reload. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis
mv ComfyUI-Data-Analysis data-analysis # README: examples expect this folder name
pip install -r data-analysis/requirements.txt
Dependencies: pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml. No GPU, no model files. PyTorch nodes moved to ComfyUI-Pt-Wrapper in March 2025, so this pack stays CPU-only.
Gotchas
- It's JSON, not Python. Single quotes fail -
['a','b']is invalid JSON. Use double quotes. This trips up almost everyone once. - Trailing commas are invalid JSON too.
[1, 2,]errors. - The output is still a string. It's JSON text that the pack's list nodes interpret. Don't expect a native list to come out of the socket - the convention is the contract.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| data | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |