Create JSON Object (PixNodes)
A real key-value editor for your workflow config
- json_object
Workflows accumulate settings - a model name here, a steps count there, a boolean toggle somewhere else - and if you want to hand that bundle to an LLM, an API call, or a JSON-consuming node, you need it as a real object, not a string you hope someone parses. Pix_CreateJsonObject is the PixNodes answer: a visual key-value editor that outputs a proper JSON object. It's the sibling of Pix_CreateJsonList (arrays) and the more useful one of the two, because most config data is keyed.
The input is json_data, a STRING widget holding the editor state (default []) - you don't type JSON here, you interact with the row-based UI: add a row, give it a key and a value and a type, reorder. The backend walks those entries and builds a Python dict, which comes out of the single json_object output as a JSON-typed object. Keys are forced to strings (as JSON requires), values keep their declared type, and Chinese text is preserved rather than escaped - the node explicitly sets ensure_ascii=False, which matters if your config values are non-English.
What it's for: any place your workflow needs a structured settings blob. Feed the object to a PixNodes JSON consumer, or wire it into an LLM node as part of a prompt so the model gets clean, unambiguous parameters instead of prose. It's the "settings panel as data" pattern - you edit one tidy node instead of three scattered string widgets.
A real practical note from the pack's changelog: as of 1.0.8 the string-serialization output was removed, so json_object is the object, not a JSON text string. If a downstream node expects text, stringify it with a separate step. Don't search for a second output port that no longer exists.
Install is the standard PixNodes path - ComfyUI Manager, search PixNodes, restart - or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/pixixai/Comfyui-PixNodes
cd Comfyui-PixNodes
pip install -r requirements.txt
then restart. Requirements are just openai and Requests. No models, no VRAM, no friction.
The one thing to remember: this node is for you-maintained config. If your object should be derived from a file, a CSV, or an LLM response, use a node that builds the dict from that input instead - hand-typing keys into an editor is only worth it when you're the one changing them between runs, which is exactly the "workflow you tune by hand" case this was built for. It pairs naturally with Pix_CreateJsonList when your data mixes keyed and positional entries.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| json_data | STRING | [] | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json_object | JSON | — |