json_tool
Run JSONPath queries on JSON files to get, set, delete, merge, diff, flatten, validate, and transform data.
Instructions
Deep JSON operations with JSONPath ($.key, $..key, $.arr[*], filter expressions). Operations: get, set, delete, merge (deep/shallow/replace), diff, flatten, unflatten, validate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to JSON file | |
| query | No | JSONPath expression | |
| value | No | Value to set (any JSON type) | |
| output | No | Output file path (defaults to input) | |
| strategy | No | Merge strategy (default: deep) | |
| compareTo | No | Second file path for diff operation | |
| mergeWith | No | Object to merge (inline) | |
| operation | Yes | JSON operation to perform | |
| transforms | No | Array of transformations to apply | |
| mergeWithFile | No | Path to file to merge with |