String To Json Object
Parse raw text into a JSON object other JNodes can use
- JSON_OBJECT
JNodes builds a chunk of its metadata and prompt-parameter tooling on JSON under the hood - a1111-style PNG metadata is basically a bag of key/value pairs, and JNodes' "parameter lists" feature (write <params: image_size_x: 1024> in your prompt to override values without touching a widget) parses out of text the same way. String To Json Object is the entry point for that: feed it raw text that's valid JSON, and it hands you back a proper JSON_OBJECT pin instead of a string ComfyUI can't do anything structured with.
What it's actually doing
Nothing fancier than it sounds - it parses the string you give it and, if that string is valid JSON, outputs it as a JSON_OBJECT. That distinction matters more than it looks: a STRING pin in ComfyUI is just text, so any node downstream that wants to read a specific key out of it (rather than treat the whole blob as one opaque value) needs the data in an actual structured type first. This node is that conversion step. It pairs naturally with JNodes' metadata nodes - things like JNodes_AddOrSetMetaDataKey, which read and write a1111-style PNG info - since those are working with the same kind of key/value data this node produces.
Inputs and outputs
Simple in, structured out:
string- a multiline text field (default empty). This is where you paste or wire in your raw JSON text - a{"key": "value"}blob, an object pulled from a file, metadata copied off another image, whatever.JSON_OBJECT(output) - the parsed result, ready to plug into any other JNodes node that expects this type.
There's no second output or error-reporting pin exposed here, so if the string you feed it isn't valid JSON, expect the node to fail loudly (a graph error) rather than pass something through silently - treat malformed input as a hard stop, not a soft failure you'll only notice downstream.
Installing it
Same install as the rest of the pack - this is a Python node with no extra dependency or model of its own:
- ComfyUI Manager: search "JNodes" and install.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/JaredTherriault/ComfyUI-JNodes, thenpip install -r requirements.txtfor the pack's shared requirements, then restart ComfyUI.
Common issues
The main failure mode is exactly what you'd expect from a JSON parser: malformed or non-JSON text (missing quotes, trailing commas, a plain sentence instead of an object) will error the node rather than convert anything. If you're building the string dynamically - say, assembling it from a JNodes_SyncedStringLiteral or piecing it together with JNodes_SearchAndReplace - validate the final text once outside the graph (any JSON linter will do) before wiring it through, since a single stray character breaks the whole conversion.
Beyond the node itself, the same general caution applies as with the rest of JNodes: it's a large pack that changes ComfyUI's UI the moment it's installed - a floating status indicator, an image drawer docked to the screen, custom favicon behavior - and the README's own Caveats section flags real conflicts with other popular packs (pysssss.ImageFeed, Comfy.DynamicPrompts, Comfy.EditAttention). If something in your UI looks off after installing JNodes, check ComfyUI Settings > JNodes > Extension Management before assuming it's this node's fault - you can disable individual pieces there instead of uninstalling the whole pack.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| JSON_OBJECT | JSON_OBJECT | — |