Nodes/smn_support_nodes/[SSN] Input JSON
ComfyUI Node

[SSN] Input JSON

A JSON text box that refuses to judge your syntax — and that's a trap

By SummonTheCat·Created about a year ago·Updated about a year ago· 0
[SSN] Input JSON
    • value
    ◄string{}►

    [SSN] Input JSON is a multiline text box that outputs a STRING - a JSON-shaped string, in the happy case. It's the seed node of this pack's JSON corner: you type your JSON here, wire the value output into the pack's Get Key Value / Get Index Value / Get Value As nodes, and pull bits out for the rest of the workflow.

    The honest catch, and it's a real one: this node does not validate your JSON. Read the source and execute() just returns the string you typed - there's no json.loads anywhere. Paste a missing comma or a trailing brace and the node happily passes it along; the error only surfaces later, when a Get node downstream tries to parse it and quietly returns an empty string instead of telling you what broke. So the workflow works like a row of dominoes where the first one never falls, and you're left wondering which node ate your data.

    That's actually the most useful thing to know about it. Keep your JSON valid - if you're not sure, paste it into any JSON linter once before dropping it in - and everything downstream behaves. Get in the habit of treating this box as "raw text with JSON aspirations."

    On the positive side, the default is {} and the field is genuinely multiline, so pretty-printed nested JSON is readable instead of a one-line horror show. And unlike the pack's Input String node, this one signals intent: anyone reading your graph knows the thing coming out of here is supposed to be structured data, which is half the legibility battle in a busy workflow.

    The workflow pattern that makes it worth using: a JSON blob of parameters (width, height, seed, whatever) defined once at the top of the graph, fanned out through Get nodes into different corners of the workflow, so the whole "configuration" of a run lives in one box. That's the repetition-fighting playbook from ComfyUI's plumbing layer applied to structured data.

    Install

    Part of smn_support_nodes by SummonTheCat. ComfyUI Manager → search smn_support_nodes → Install → restart ComfyUI, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SummonTheCat/smn_support_nodes
    

    Restart after installing. Dependencies (opencv-python, imageio-ffmpeg) auto-install; no models to download.

    Troubleshooting

    Ninety percent of issues with this node are malformed JSON being passed downstream. If a Get node returns an empty string or a downstream node silently ignores your value, check the box for a stray comma or an unmatched brace first - and remember this node won't tell you. For arrays, pair it with SsnJSONGetIndexValue; for objects, SsnJSONGetKeyValue; and when a value comes back with quotes around it (it will, since the Get nodes serialize with json.dumps), SsnJSONGetValueAs is the node that strips them.

    CategoryInput

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING{}—

    Outputs (1)

    NameTypeDescription
    valueSTRING—