77trust / 100

Json Diff

by Structured Data Tools in Documents & files

x402 APIPassing, checked 3 h ago

JSON Patch diff — compare JSON documents for record updates and configuration synchronization; return a deterministic RFC 6902 patch with RFC 6901 pointers and exact decimal equality. Object removals precede changes; changed arrays are replaced whole, so the patch is bounded rather than guaranteed minimal.

POST https://data-tools.use.x402atlas.com/json-diff

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
413 ms typical, 464 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://data-tools.use.x402atlas.com/json-diff' \
  -H 'content-type: application/json' \
  --data-raw '{"source":{"baz":"qux","foo":"bar"},"target":{"baz":"boo","foo":"bar"}}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdata-tools.use.x402atlas.com%2Fjson-diff
const res = await pay("https://data-tools.use.x402atlas.com/json-diff", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"source\":{\"baz\":\"qux\",\"foo\":\"bar\"},\"target\":{\"baz\":\"boo\",\"foo\":\"bar\"}}",
});
console.log(await res.json());

Example input

{
  "source": {
    "baz": "qux",
    "foo": "bar"
  },
  "target": {
    "baz": "boo",
    "foo": "bar"
  }
}

Example output

{
  "algorithm_version": "json-patch-diff-v1",
  "format": "rfc6902",
  "input": {
    "source_node_count": 3,
    "target_node_count": 3
  },
  "operation": "json-diff",
  "patch": [
    {
      "op": "replace",
      "path": "/baz",
      "value": "boo"
    }
  ],
  "warnings": []
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402439 ms$0.01
7 h agoPassed402460 ms$0.01
11 h agoPassed402464 ms$0.01
15 h agoPassed402495 ms$0.01
19 h agoPassed402413 ms$0.01
22 h agoPassed402453 ms$0.01
26 h agoPassed402404 ms$0.01
30 h agoPassed402459 ms$0.01
33 h agoPassed402395 ms$0.01
37 h agoPassed402459 ms$0.01
40 h agoPassed402422 ms$0.01
44 h agoPassed402375 ms$0.01
2 days agoPassed402399 ms$0.01
2 days agoPassed402386 ms$0.01
2 days agoPassed402427 ms$0.01