Nodes/WorkflowX Configurator/JsonX - Visual Builder
ComfyUI Node

JsonX - Visual Builder

Build structured JSON prompts without reading JSON

By haroonaslam·Created 4 months ago·Updated 7 days ago· 10
JsonX - Visual Builder
    • prompt_json
    prompt_json{}

    Structured JSON prompting is a real thing on modern LLM-encoded models - the KB's own research found JSON prompting working well when you have several characters or attributes and prose keeps bleeding them together. But writing JSON by hand in a tiny widget box is miserable. JsonX - Visual Builder is WorkflowX's answer: a browser UI that lets you assemble a prompt as a tree of fields, groups, and arrays, while the node itself normalizes and emits valid JSON.

    It's one of three JsonX nodes in the pack (with the Template Importer and the Template Randomizer), and it's the one you reach for when you want to compose - build the structure once, prettily, then let the template machinery vary it later.

    How it works

    The node is deliberately boring on the backend: it takes an optional prompt_json string, parses it, and re-emits it normalized (indented, valid). If the input isn't valid JSON, it returns a small error payload instead of crashing. All the interesting work happens in the browser: clicking the open-builder button pops the JsonX visual editor, where you construct the prompt as a structured tree - scene, subject, camera, lighting, wardrobe sections - with preset-backed fields drawn from the bundled preset library.

    That separation is the design. The node is the stable, serializable bridge between the visual editor and the rest of your graph; the editor is where you spend your time. Output is a prompt_json STRING you feed into whatever consumes structured prompts downstream - commonly the next JsonX node, or a model that accepts JSON prompt formatting.

    Inputs and outputs

    • prompt_json (STRING, optional) - seed the editor with existing JSON. Defaults to {}.
    • Output: prompt_json (STRING) - normalized JSON.

    There's a preset library and schema fields living in the frontend, so don't expect to author templates purely by typing in this widget - the builder UI is the point.

    Install

    Ships in WorkflowX-Configurator. ComfyUI Manager → search WorkflowX Configurator, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/haroonaslam/WorkflowX-Configurator
    

    Restart ComfyUI and hard-refresh the browser - the visual builder is a frontend extension, and a stale tab is the number one reason people think it's missing.

    Common issues

    • Builder button missing. Hard-refresh. If it's still gone, check the pack loaded via /object_info and restart.
    • Node spits out an "Invalid JSON" payload. You (or an upstream node) fed it malformed JSON. The error payload carries the raw text so you can find the problem.
    • Output isn't what the editor showed. The node normalizes - indentation and formatting change, structure shouldn't. If structure changed, the editor state and the string were out of sync; rebuild from the editor.

    The honest caveat: JSON prompting only pays off if the model you're driving actually benefits from structure. On tag-based or short-prompt models it's ceremony. But if you're on an LLM-encoded model with several concurrent subjects, this node is the difference between wrestling braces and dragging fields around. Worth trying alongside the randomizer, since a good template is what makes the randomizer sing.

    CategoryWorkflowX/Prompting/JsonX

    Inputs (1)

    NameTypeDefaultDescription
    prompt_jsonoptSTRING{}

    Outputs (1)

    NameTypeDescription
    prompt_jsonSTRING