ComfyUI Node

Quick JSON

Eight inline key=value slots when you don't need the heavy machinery

By ollieedgeley·Created 6 months ago·Updated 6 months ago· 3
Quick JSON
    • JSON_TEXT
    pretty_printtrue
    entry_0
    entry_1
    entry_2
    entry_3
    entry_4
    entry_5
    entry_6
    entry_7

    Most JSON building in comfyui-json-nodes means reaching for JSON Field, which is the right tool when you need typing and nesting. But sometimes you just want a small object with a few plain string values, and standing up a separate Field node per key is ceremony. Quick JSON is the shortcut: eight inline slots, type name=value or name: value into each, get a JSON object out.

    How it works

    The node exposes eight optional entry slots, labelled entry 1 through entry 8 in the UI. Each takes a single line in key=value or key: value format - both separators work, pick whichever your fingers reach for. Blank entries are silently ignored, and entries are processed in numeric order, so if you fill entry 1 with name=alice and entry 3 with name=bob, the later one wins and you get {"name": "bob"}. That overwrite-in-order behavior is the only real rule to remember.

    The one deliberate limitation: values stay strings. Quick JSON does no type coercion, so count=12 gives you "12", quoted, not the number 12. If you need a real integer, float, boolean, or array in the output, that's what JSON Field's type dropdown is for. This node is for the 80% case where a payload is mostly text fields.

    Inputs and output

    • entry_0entry_7 - optional STRING inputs, key=value or key: value.
    • pretty_print - on by default.

    Output is JSON_TEXT, a STRING with the built object (which starts as {} if every entry is blank).

    Installing it

    Same story as every node in this pack - it ships with olliethomas1992/comfyui-json-nodes. ComfyUI Manager, search comfyui-json-nodes, or:

    cd <ComfyUI>/custom_nodes
    git clone https://github.com/olliethomas1992/comfyui-json-nodes
    

    Restart ComfyUI and it's under utils/json. No dependencies beyond what ComfyUI already ships.

    Common issues

    The main one is format drift: type a slot without = or : and the node raises an error pointing you at the expected key=value or key: value format, so at least the failure is readable. The sneaky one is the string-typing trap above - if your output later goes into something that needs a number, it'll silently be a string. And a quirk of how the entries parse: the value keeps any = or : inside it (url=https://… works fine, the key just ends at the first separator), so don't panic about colons in values.

    Categoryutils/json

    Inputs (9)

    NameTypeDefaultDescription
    pretty_printBOOLEANtrue
    entry_0optSTRINGFormat: key=value or key: value
    entry_1optSTRINGFormat: key=value or key: value
    entry_2optSTRINGFormat: key=value or key: value
    entry_3optSTRINGFormat: key=value or key: value
    entry_4optSTRINGFormat: key=value or key: value
    entry_5optSTRINGFormat: key=value or key: value
    entry_6optSTRINGFormat: key=value or key: value
    entry_7optSTRINGFormat: key=value or key: value

    Outputs (1)

    NameTypeDescription
    JSON_TEXTSTRING