Skip to content
Free static example · no wallet required

Deterministic JSON repair

Inspect the exact response envelope first. When you need current analysis for your own input, one successful x402 call costs $0.005 USDC on Base or Solana.

No accountNo subscriptionExact USDC priceFresh calls only are paid
Full response envelope

What you receive

Demonstration data only. The paid endpoint returns a fresh result and settlement receipt.

{
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "data.json-repair",
  "version": "1",
  "data": {
    "valid": true,
    "validInput": false,
    "repaired": true,
    "content": "{\n  \"active\": true,\n  \"rows\": [\n    1,\n    2,\n    3\n  ],\n  \"status\": \"ok\"\n}",
    "inputSha256": "9dd0095fe6576143aa8e835ced506030e8065e2589c4478a4be1342dc1aaa2ed",
    "attemptSha256": "4db25e6c34e4f507a7b3addba28d9c40bda76572ef52c9a7b49facdea7f19440",
    "outputSha256": "b1b2333ad8949036facfd8ce006b4da0e612468a0e8a9b016514208af13321d5",
    "appliedRepairs": [
      {
        "strategy": "markdown_fence",
        "occurrences": 1,
        "beforeSha256": "9dd0095fe6576143aa8e835ced506030e8065e2589c4478a4be1342dc1aaa2ed",
        "afterSha256": "e47f9ab1e0ee78db083237290fcdd35f83668f2b939c92e434b2103af7856f4f"
      },
      {
        "strategy": "comments",
        "occurrences": 1,
        "beforeSha256": "e47f9ab1e0ee78db083237290fcdd35f83668f2b939c92e434b2103af7856f4f",
        "afterSha256": "32c07c381a864b84081a14113c51362f1bd433d11508384527398201c6297f13"
      },
      {
        "strategy": "single_quoted_strings",
        "occurrences": 1,
        "beforeSha256": "32c07c381a864b84081a14113c51362f1bd433d11508384527398201c6297f13",
        "afterSha256": "342754701e195410b00be4982ce0f253988027a4d8aaeefcc6919f0322e75d0c"
      },
      {
        "strategy": "unquoted_keys",
        "occurrences": 3,
        "beforeSha256": "342754701e195410b00be4982ce0f253988027a4d8aaeefcc6919f0322e75d0c",
        "afterSha256": "59847350008ddd4fc3961827f32dff57a40e71cd232b55e1791d75fa3f677256"
      },
      {
        "strategy": "python_literals",
        "occurrences": 1,
        "beforeSha256": "59847350008ddd4fc3961827f32dff57a40e71cd232b55e1791d75fa3f677256",
        "afterSha256": "01ee6bffd9608824b7e78f21446bf858c5b64bfcd60ad539b1dd5879af7f3121"
      },
      {
        "strategy": "trailing_commas",
        "occurrences": 2,
        "beforeSha256": "01ee6bffd9608824b7e78f21446bf858c5b64bfcd60ad539b1dd5879af7f3121",
        "afterSha256": "4db25e6c34e4f507a7b3addba28d9c40bda76572ef52c9a7b49facdea7f19440"
      }
    ],
    "error": null,
    "repair": {
      "version": "apiacre-json-repair/1",
      "permitted": [
        "markdown_fence",
        "comments",
        "single_quoted_strings",
        "unquoted_keys",
        "python_literals",
        "trailing_commas"
      ],
      "executionOrder": [
        "markdown_fence",
        "comments",
        "single_quoted_strings",
        "unquoted_keys",
        "python_literals",
        "trailing_commas"
      ],
      "appliedStrategyCount": 6,
      "outputCanonicalization": "json-sort-keys-indent-2-utf8",
      "duplicateKeysAllowed": false,
      "nonFiniteNumbersAllowed": false,
      "deterministic": true,
      "networkRequestsMade": 0
    },
    "warnings": []
  },
  "meta": {
    "duration_ms": 42,
    "cached": false,
    "sources": [],
    "warnings": [],
    "next_actions": [
      {
        "service": "data.schema",
        "title": "JSON Schema generator",
        "reason": "Infer a reusable Draft 2020-12 contract from the successfully repaired JSON.",
        "method": "POST",
        "path": "/v1/data/schema",
        "price": "$0.025",
        "input_template": {
          "content": "$result.data.content",
          "format": "json",
          "root_mode": "preserve"
        },
        "use_output": "Continue only when result.data.valid is true; persist the schema together with the repair input and output hashes.",
        "handoff_path": "/catalog/data.schema",
        "checkout_path": "/try/data.schema",
        "sample_path": "/samples/data.schema",
        "maximum_atomic_usdc": "25000",
        "handoff_payment_required": false,
        "executes_automatically": false,
        "authorization_required": true
      }
    ]
  }
}
Example request

Input JSON

{
  "content": "```json\n{\n  // generated result\n  status: 'ok',\n  rows: [1, 2, 3,],\n  active: True,\n}\n```",
  "repairs": [
    "markdown_fence",
    "comments",
    "single_quoted_strings",
    "unquoted_keys",
    "python_literals",
    "trailing_commas"
  ]
}
Delivery contract

One paid POST

Repair caller-supplied malformed JSON by safely removing an outer Markdown fence, comments, single-quoted strings, unquoted identifier keys, Python literals, and trailing commas, with transformation hashes and strict rejection of duplicate keys or non-finite numbers.

POST /v1/data/json-repair

Inspect validation rules and output schema

Need current data?

Run this exact service.

The checkout verifies the request, selected network, USDC asset, recipient, and price before opening a wallet.

Continue · $0.005 USDC