Repair caller-supplied malformed JSON by safely removing an outer Markdown fence, comments
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.
5000 (raw units)
price
2
calls / 30d
2
unique payers
2026-08-31
updated
Provider
apiacre.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xa0BFa4f07281c9b248DC3AED2217836BcA24869B",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "B4CHWQeQn7GDLZD2aW6hpGG2bEseisBFLZYECA3HDLan",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "5000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"content": "```json\n{\n // generated result\n status: 'ok',\n rows: [1, 2, 3,],\n active:...",
"repairs": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
]
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"data": {
"appliedRepairs": [
{
"afterSha256": "e47f9ab1e0ee78db083237290fcdd35f83668f2b939c92e434b2103af7856f4f",
"beforeSha256": "9dd0095fe6576143aa8e835ced506030e8065e2589c4478a4be1342dc1aaa2ed",
"occurrences": 1,
"strategy": "markdown_fence"
}
],
"attemptSha256": "4db25e6c34e4f507a7b3addba28d9c40bda76572ef52c9a7b49facdea7f19440",
"content": "{\n \"active\": true,\n \"rows\": [\n 1,\n 2,\n 3\n ],\n \"status\": \"ok\"\n}",
"error": null,
"inputSha256": "9dd0095fe6576143aa8e835ced506030e8065e2589c4478a4be1342dc1aaa2ed",
"outputSha256": "b1b2333ad8949036facfd8ce006b4da0e612468a0e8a9b016514208af13321d5",
"repair": {
"appliedStrategyCount": 6,
"executionOrder": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
],
"outputCanonicalization": "json-sort-keys-indent-2-utf8",
"permitted": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
],
"version": "apiacre-json-repair/1"
},
"repaired": true,
"valid": true,
"validInput": false,
"warnings": []
},
"meta": {
"cached": false,
"duration_ms": 42,
"next_actions": [
{
"method": "POST",
"path": "/v1/data/schema",
"reason": "Infer a reusable Draft 2020-12 contract from the successfully repaired JSON.",
"service": "data.schema",
"title": "JSON Schema generator"
}
],
"sources": [],
"warnings": []
},
"request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
"service": "data.json-repair",
"version": "1"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"content": {
"type": "string"
},
"repairs": {
"items": {
"enum": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
],
"type": "string"
},
"type": "array"
}
},
"required": [
"content"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST",
"PUT",
"PATCH"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"data": {
"properties": {
"appliedRepairs": {
"items": {},
"type": "array"
},
"attemptSha256": {
"type": "string"
},
"content": {
"type": "string"
},
"error": {
"type": [
"string",
"null"
]
},
"inputSha256": {
"type": "string"
},
"outputSha256": {
"type": "string"
},
"repair": {
"type": "object"
},
"repaired": {
"type": "boolean"
},
"valid": {
"type": "boolean"
},
"validInput": {
"type": "boolean"
},
"warnings": {
"items": {},
"type": "array"
}
},
"type": "object"
},
"meta": {
"properties": {
"cached": {
"type": "boolean"
},
"duration_ms": {
"type": "integer"
},
"next_actions": {
"items": {
"type": "object"
},
"type": "array"
},
"sources": {
"items": {
"type": "string"
},
"type": "array"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"duration_ms",
"cached",
"sources",
"warnings",
"next_actions"
],
"type": "object"
},
"request_id": {
"type": "string"
},
"service": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"request_id",
"service",
"version",
"data",
"meta"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"payment-identifier": {
"info": {
"required": false
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"required"
],
"type": "object"
}
}
}Use it
curl
curl "https://apiacre.com/v1/data/json-repair" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://apiacre.com/v1/data/json-repair");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://apiacre.com/v1/data/json-repair")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/2543.json, and this resource appears in /discovery/resources and /discovery/search.