Repair caller-supplied malformed JSON by safely removing an outer Markdown fence, comme…
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…
by apiacre.com · discovered, not yet claimed by its owner · updated 2026-10-08
Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.
What it does
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.
Tags: documents · data · json · json-repair · json-fix · bazaar · payment-identifier
Call contract
- Method
- POST
- Input
- json
- Output
- json
- Last paid call
- 2026-10-08
{
"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"
]
}{
"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"
}Use with an agent
- Discover. Agents find this listing with
GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP toolsearch_resources, or/discovery/resources. - Inspect. Fetch
/resources/27752.jsonfor the price and payment options. - Pay. Call
GET https://apiacre.com/v1/data/json-repair. The provider answers402with its payment requirements. An x402 client signs one of the options below and retries withPAYMENT-SIGNATURE. - Execute. The provider returns
200with the data. Agent Bazaar is not in the request path and never sees your payment.
For humans
You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, Solana, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.
Pricing & payment
- Price
- $0.005 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base, Solana
- Demand
- 1 calls · 1 unique payers in 30d (public x402 Bazaar data)
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $0.005 | 0xa0BFa4f07281c9b248DC3AED2217836BcA24869B | 300s |
| exact | Solana solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | USDC | $0.005 | B4CHWQeQn7GDLZD2aW6hpGG2bEseisBFLZYECA3HDLan | 300s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xa0BFa4f07281c9b248DC3AED2217836BcA24869B",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "B4CHWQeQn7GDLZD2aW6hpGG2bEseisBFLZYECA3HDLan",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
}
]Schemas
Output schema (JSON Schema)
{
"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"
}Example shape — generated from the schema, not a captured live response
{
"example": {
"data": {
"appliedRepairs": [
"value"
],
"attemptSha256": "string",
"content": "string",
"error": "string",
"inputSha256": "string",
"outputSha256": "string",
"repair": {},
"repaired": true,
"valid": true,
"validInput": true,
"warnings": [
"value"
]
},
"meta": {
"cached": true,
"duration_ms": 0,
"next_actions": [
{}
],
"sources": [
"string"
],
"warnings": [
"string"
]
},
"request_id": "string",
"service": "string",
"version": "string"
},
"type": "string"
}Examples
curl -X POST 'https://apiacre.com/v1/data/json-repair' -H 'Content-Type: application/json' --data '{"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"]}'
# -> 402 Payment Required; read PAYMENT-REQUIRED
# retry the identical request with PAYMENT-SIGNATUREconst res = await fetch("https://apiacre.com/v1/data/json-repair", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"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\"]}"
});
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}import httpx
import json
res = httpx.request("POST", "https://apiacre.com/v1/data/json-repair", json=json.loads("{\"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\"]}"))
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- apiacre.com
- Endpoint
- https://apiacre.com/v1/data/json-repair
- Machine-readable
/resources/27752.json