JSON merge patch

json-merge-patch · version 1.0.0 · JSON & JSONL · free, no key needed

Apply an RFC 7396 JSON Merge Patch to a JSON value.

Use when you need to: json merge patch · apply json merge patch · rfc 7396 merge patch.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "target": {
    "title": "Goodbye!",
    "author": {
      "givenName": "John",
      "familyName": "Doe"
    },
    "tags": [
      "example",
      "sample"
    ],
    "content": "This will be unchanged"
  },
  "patch": {
    "title": "Hello!",
    "phoneNumber": "+01-123-456-7890",
    "author": {
      "familyName": null
    },
    "tags": [
      "example"
    ]
  }
}

Response:

{
  "result": {
    "value": {
      "title": "Hello!",
      "author": {
        "givenName": "John"
      },
      "tags": [
        "example"
      ],
      "content": "This will be unchanged",
      "phoneNumber": "+01-123-456-7890"
    }
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "json-merge-patch",
  "version": "1.0.0",
  "input": {
    "target": {
      "title": "Goodbye!",
      "author": {
        "givenName": "John",
        "familyName": "Doe"
      },
      "tags": [
        "example",
        "sample"
      ],
      "content": "This will be unchanged"
    },
    "patch": {
      "title": "Hello!",
      "phoneNumber": "+01-123-456-7890",
      "author": {
        "familyName": null
      },
      "tags": [
        "example"
      ]
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-merge-patch/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"target":{"title":"Goodbye!","author":{"givenName":"John","familyName":"Doe"},"tags":["example","sample"],"content":"This will be unchanged"},"patch":{"title":"Hello!","phoneNumber":"+01-123-456-7890","author":{"familyName":null},"tags":["example"]}}'

The machine-readable contract is at /v1/tools/json-merge-patch/versions/1.0.0.

CLI

node cli.mjs run json-merge-patch 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.