json_tool
Query and patch JSON at dotted paths without rewriting whole files. Get, set, delete, merge, list keys, validate, and format on a file or inline text.
Instructions
Query and patch JSON without rewriting the whole file: get (read a path), set, delete, merge (deep), keys (list a level), validate, format (pretty-print or minify). Paths look like "scripts.build" or "items[0].name". Works on a file (path=) or inline text (content=).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | JSON file to read (and write, for set/delete/merge/format). | |
| value | No | set: the new value (any JSON type). merge: the object to merge in. | |
| action | Yes | What to do. | |
| indent | No | Indent for written/formatted output. Default 2; 0 minifies. | |
| content | No | Inline JSON text instead of a file. Nothing is written in this mode. | |
| json_path | No | Dotted/bracketed path inside the document, e.g. "a.b[0].c". Omit for the root. | |
| max_bytes | No | Byte cap on returned output. | |
| create_missing | No | set: create intermediate objects that do not exist. Default true. |