# JSON Merge Patch

Merge a JSON Merge Patch (RFC 7386) into a document: objects merge, null deletes a key.

- Endpoint: `POST https://setget.net/v1/tools/json-merge-patch` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `json-merge-patch`
- Page: https://setget.net/tools/json-merge-patch

## Inputs

- `text` (required, string): The JSON document to change.
- `patch` (required, string): The merge patch.
- `indent` (optional, integer, default `2`, range 0..8): Spaces per level. 0 gives one compact line.

## Example

```json
{"input":{"text":"{\"a\":1,\"b\":{\"c\":2,\"d\":3}}","patch":"{\"b\":{\"c\":null,\"e\":4}}","indent":0}}
```

Result:

```json
{"text":"{\"a\":1,\"b\":{\"d\":3,\"e\":4}}"}
```

**How do I replace an array?** Arrays are always replaced whole. Merge Patch cannot change a single array item.
