Nodes/ComfyUI-LLMs-Toolkit/JSON Builder Large
ComfyUI Node

JSON Builder Large

When your structured data outgrows the medium

By ComfyUI-Kelin·Created 2 years ago·Updated 4 months ago· 27
JSON Builder Large
    • json_string
    key_1
    key_2
    key_3
    key_4
    key_5
    key_6
    key_7
    key_8
    key_9
    key_10
    value_1
    value_2
    value_3
    value_4
    value_5
    value_6
    value_7
    value_8
    value_9
    value_10

    Ten key-value pairs in one node, because the medium just isn't enough

    JSON Builder Large is the top of ComfyUI-LLMs-Toolkit's JSON Builder ladder: one node that assembles up to ten key-value pairs into a single JSON object. Where Medium gives you five pairs for a prompt block, Large is for the cases where your structured payload is genuinely big - a full character sheet, a complete image-gen config for an API, a metadata bundle you're about to merge with JSON Combine or feed into a String Template. It's the same mechanism as its siblings, just more of it.

    It's the least glamorous node in the pack and I say that as a compliment. Ten text boxes and ten value boxes, one output, no magic. The whole point is that you get valid, properly-quoted, correctly-escaped JSON on the output wire no matter how sloppily you type the inputs - which is a real win once you're juggling ten fields by hand and would otherwise be counting braces.

    How it works

    Same core as Simple and Medium: key_1 through key_10 are the property names, value_1 through value_10 the matching values, and the node skips any pair with a blank key. Each value is passed through json.loads before being written, so numbers, booleans, nulls, and nested objects stay native JSON types instead of becoming quoted strings. The output is a single pretty-printed JSON string. Connect a value slot to another JSON-producing node and you can nest structures arbitrarily deep - you don't have to do the nesting by hand.

    Inputs and output

    • key_1 … key_10 (required, all default empty) - property names. Blank ones are dropped.
    • value_1 … value_10 (optional) - matching values, JSON-parsed, connectable.
    • Output: json_string - the assembled object, indented two spaces.

    Installing

    Part of the HuangYuChuh/ComfyUI-LLMs-Toolkit pack - one install gets you all of its nodes. ComfyUI Manager → search ComfyUI-LLMs-Toolkit → Install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HuangYuChuh/ComfyUI-LLMs-Toolkit
    cd ComfyUI-LLMs-Toolkit
    pip install -r requirements.txt
    

    It lives under 🚦ComfyUI_LLMs_Toolkit/JSON. Dependencies are featherweight - Pillow and aiohttp - and no models are involved.

    Gotchas

    The honest take on Large: it's a lot of boxes, and most workflows never need all ten. If your output is missing fields, you almost certainly left a key blank - blank pairs vanish rather than producing empty strings, which is a feature until you forget it's a feature. Also remember the JSON-parsing behavior on values: a value like 05 or one with a stray comma can fall back to a string unexpectedly. And if you're finding yourself wiring ten inputs, step back - for genuinely big or repeated structure, you're usually better off composing a few Medium builders through JSON Combine, which merges objects and lets later inputs override earlier ones, than maintaining one giant node.

    Category🚦ComfyUI_LLMs_Toolkit/JSON

    Inputs (20)

    NameTypeDefaultDescription
    key_1STRING
    key_2STRING
    key_3STRING
    key_4STRING
    key_5STRING
    key_6STRING
    key_7STRING
    key_8STRING
    key_9STRING
    key_10STRING
    value_1optSTRING
    value_2optSTRING
    value_3optSTRING
    value_4optSTRING
    value_5optSTRING
    value_6optSTRING
    value_7optSTRING
    value_8optSTRING
    value_9optSTRING
    value_10optSTRING

    Outputs (1)

    NameTypeDescription
    json_stringSTRING