Deep merge JSON combines a base object with an overlay. Nested objects merge field by field; when both sides have arrays, values are concatenated. Scalar values in the overlay replace scalars in the base at the same path.
How it works
Both inputs are parsed as JSON objects. For each key in the overlay, if the base has an object at that key and the overlay value is also an object, the merge recurses. If both values are arrays, elements are concatenated in order ([...base, ...overlay]). Otherwise the overlay value wins. The merged result is pretty-printed in the output field for readability.
When to use it
- Merge default agent tool config with user overrides
- Combine partial API responses into one document
- Layer environment-specific JSON onto a template
- Stitch feature flags from multiple sources before deployment review
Example
Base {"a":1,"items":[1]} plus overlay {"b":2,"items":[2]} yields {"a":1,"b":2,"items":[1,2]} with indented formatting in the output field.
Limitations
Root values must be JSON objects—not arrays or bare strings. This is not JSON Merge Patch (RFC 7396); array merge always concatenates rather than replacing. Invalid JSON in either field shows a parse error with no partial output.