Expand Dumas JSON utility nodes

This commit is contained in:
2026-07-21 10:48:10 +00:00
parent aa0fe4fa3d
commit 3b918fd36f
3 changed files with 330 additions and 11 deletions

View File

@@ -1,12 +1,45 @@
# DumasNodes
`DumasNodes` is a ComfyUI custom-node pack for generic utility workflows under the Dumas brand. The repo starts by replicating the JSON string parsing helper from [`a-und-b/ComfyUI_JSON_Helper`](https://github.com/a-und-b/ComfyUI_JSON_Helper) and rebadging it into a reusable `Dumas` namespace.
`DumasNodes` is a ComfyUI custom-node pack for generic utility workflows under the Dumas brand.
## Included Nodes
- `Dumas JSON String to Object`
- Converts a JSON string into a JSON object so downstream nodes can consume structured data.
- Lives in the `Dumas/JSON` category.
- Input: `json_string`
- Output: parsed `JSON`
- Use it to turn raw JSON text into a structured object.
- `Dumas JSON Object to String`
- Inputs: `json_object`, `pretty`, `sort_keys`
- Output: serialized `STRING`
- Use it to compact or pretty-print JSON for prompts, logs, or file output.
- `Dumas JSON Get Value`
- Inputs: `json_object`, `path`
- Output: `JSON`
- Reads a nested value using dot paths like `user.profile.name` or `items.0.id`.
- `Dumas JSON Set Value`
- Inputs: `json_object`, `path`, `value_json`
- Output: updated `JSON`
- Writes a parsed JSON value into a nested path without mutating the original object.
- `Dumas JSON Merge Objects`
- Inputs: `base_object`, `overlay_object`
- Output: merged `JSON`
- Deep-merges dictionaries so overlay values replace or extend the base object.
- `Dumas JSON Keys`
- Input: `json_object`
- Outputs: `keys` as JSON array, `count` as integer
- Lists the top-level keys of an object and reports how many there are.
- `Dumas JSON Array Length`
- Input: `json_array`
- Output: `INT`
- Returns the length of a JSON array.
All nodes live in the `Dumas/JSON` category.
## Installation
@@ -26,16 +59,28 @@
## Usage
Add `Dumas JSON String to Object` anywhere you need to bridge plain-text JSON output into structured JSON input.
Use dot paths for nested access:
```text
user.profile.name
items.0.id
settings.render.width
```
`Dumas JSON Set Value` expects `value_json` to be valid JSON, so strings should be quoted:
```json
"Dumas"
```
```json
{"enabled": true, "retries": 3}
```
## Roadmap
This repo is intended to grow into a broader set of Dumas-branded generic utility nodes, including JSON helpers and adjacent data-manipulation tools.
## Credits
The first node is derived from the upstream `ComfyUI_JSON_Helper` project by `a-und-b`, then repackaged and branded for the Dumas node collection.
## License
MIT.