JSON keyed resolution apply

json-keyed-resolution-apply · version 1.0.0 · JSON & JSONL · free, no key needed

Apply explicit choices to every keyed-array merge conflict and return the fully reconstructed JSON array.

Use when you need to: apply keyed JSON merge resolutions · resolve three way array conflicts · choose left or right per JSON key.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-keyed-resolution-apply@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use json-keyed-resolution-apply@1.0.0 for apply keyed JSON merge resolutions. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "base": [
    {
      "id": "x",
      "n": 0
    }
  ],
  "left": [
    {
      "id": "x",
      "n": 1
    }
  ],
  "right": [
    {
      "id": "x",
      "n": 2
    }
  ],
  "key_pointer": "/id",
  "resolutions": [
    {
      "conflict_id": "key:x",
      "choice": "left"
    }
  ]
}

Response:

{
  "result": {
    "reference": "RFC 8259 + RFC 6901 + ComputeFirst R23 keyed merge rules",
    "version": "r23-json-keyed-merge-1.0.0",
    "resolved": [
      {
        "id": "x",
        "n": 1
      }
    ],
    "applied_count": 1
  }
}

How to call it

MCP

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

{
  "id": "json-keyed-resolution-apply",
  "version": "1.0.0",
  "input": {
    "base": [
      {
        "id": "x",
        "n": 0
      }
    ],
    "left": [
      {
        "id": "x",
        "n": 1
      }
    ],
    "right": [
      {
        "id": "x",
        "n": 2
      }
    ],
    "key_pointer": "/id",
    "resolutions": [
      {
        "conflict_id": "key:x",
        "choice": "left"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-keyed-resolution-apply/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"base":[{"id":"x","n":0}],"left":[{"id":"x","n":1}],"right":[{"id":"x","n":2}],"key_pointer":"/id","resolutions":[{"conflict_id":"key:x","choice":"left"}]}'

The machine-readable contract is at /v1/tools/json-keyed-resolution-apply/versions/1.0.0.

CLI

node cli.mjs run json-keyed-resolution-apply 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.