πͺ Read JSON file (BETA)
Read JSON File (Crystools)
- json
This one does exactly what it says: give it a path, it reads the JSON file at that path and hands you back a JSON object you can wire into the rest of your graph. It's still labelled BETA in the UI - it landed in October 2024 specifically so people could pull their own external JSON files into a workflow and use the values inside without hand-copying anything.
Why you'd reach for it
The obvious use case is keeping data outside the workflow file itself - a list of prompts, a config of generation parameters, per-project settings - so you can tweak the JSON on disk without touching the graph, or share one workflow across multiple JSON configs. It's also a handy building block if you're scripting: drop values into a JSON file from an external tool, point this node at it, and let ComfyUI pick them up on the next run.
How it works
There's genuinely not much to it. The node takes a file path, opens it, parses it as JSON, and outputs the parsed result as a single JSON-typed value. Whatever's downstream - Show any, Show any to JSON, or a node that expects structured data - takes it from there.
Inputs and outputs
One optional field: path_to_json, a plain string, empty by default. That's the whole input surface - no file browser, no dropdown of files in a known folder like Load image with metadata gives you for images. You type or wire in the path yourself. Output: json, the parsed contents.
Installing it
Through ComfyUI Manager, search crystools. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/crystian/ComfyUI-Crystools.git
cd ComfyUI-Crystools
pip install -r requirements.txt
Restart ComfyUI afterward. Nothing to download beyond the pack's own lightweight Python dependencies - this node in particular needs nothing extra.
Common issues
Being BETA shows in the rough edges. Path resolution is the main one: whether a relative path works depends on ComfyUI's working directory when the server was launched, which isn't always where you'd assume - an absolute path sidesteps the guesswork entirely, so default to that unless you've confirmed relative paths behave the way you expect on your setup.
Leave path_to_json blank and there's nothing for the node to read, so don't expect useful output with an empty field - fill it in before you queue. And since there's no validation step shown in the node itself, a malformed JSON file (a stray comma, an unescaped quote) will surface as a parse error rather than a helpful "here's what's wrong with your file" message - check the file with any JSON linter before assuming the node is broken.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path_to_jsonopt | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json | JSON | β |