JSON parse error diagnosis for AI agents: Diagnose JSON parse errors, malformed JSON sy…
JSON parse error diagnosis for AI agents: Diagnose JSON parse errors, malformed JSON syntax, duplicate object keys, unexpected trailing commas and schema inference problems in a sanitized sample (max 4096 UTF-8 bytes). Returns syntax location, bounded trailin…
by NAIF Gravity · verified provider · updated 2026-11-03
What it does
JSON parse error diagnosis for AI agents: Diagnose JSON parse errors, malformed JSON syntax, duplicate object keys, unexpected trailing commas and schema inference problems in a sanitized sample (max 4096 UTF-8 bytes). Returns syntax location, bounded trailing-comma repair when supported, canonical JSON and validation evidence only after x402 payment. No secrets.
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/74773.jsonfor the price and payment options. - Pay. Call
GET https://naifgravity.com/api/x402/json-validity-check. 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, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.
Pricing & payment
- Price
- $1 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $1 | 0xEE39dAa7E6b20Fc772E9FDCA9762B69816738E25 | 300s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xEE39dAa7E6b20Fc772E9FDCA9762B69816738E25",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000000",
"amountUsd": 1,
"maxTimeoutSeconds": 300
}
]Schemas
Output schema (JSON Schema)
{
"additionalProperties": true,
"description": "One-sample JSON result. INVALID is a diagnosis, not a successful repair.",
"properties": {
"correctedJson": {
"description": "Canonical JSON; null for invalid input.",
"type": [
"string",
"null"
]
},
"heavyWork": {
"const": false
},
"inferredSchema": {
"description": "Schema inferred from this sample, not the full external contract.",
"type": [
"object",
"null"
]
},
"kind": {
"const": "json_actionable_artifact"
},
"parseError": {
"type": "string"
},
"productId": {
"const": "json-validity-check"
},
"rawInputStored": {
"const": false
},
"remainingScope": {
"items": {
"type": "string"
},
"type": "array"
},
"repairApplied": {
"enum": [
"none",
"trailing_comma_removed"
],
"type": "string"
},
"schemaNote": {
"type": "string"
},
"status": {
"enum": [
"VALID",
"REPAIRED_SAFE_PATTERN",
"INVALID"
],
"type": "string"
},
"validExample": {},
"validationTest": {
"properties": {
"code": {
"type": "string"
},
"expected": {
"const": "PASS"
},
"kind": {
"const": "deterministic_round_trip"
},
"roundTripEqual": {
"type": "boolean"
},
"runtime": {
"const": "javascript"
},
"sha256": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"topLevelType": {
"enum": [
"object",
"array",
"string",
"integer",
"number",
"boolean",
"null"
]
}
},
"type": [
"object",
"null"
]
}
},
"required": [
"productId",
"kind",
"status",
"correctedJson",
"inferredSchema",
"validExample",
"validationTest",
"rawInputStored",
"heavyWork"
],
"type": "object"
}Example shape — generated from the schema, not a captured live response
{
"correctedJson": "string",
"heavyWork": null,
"inferredSchema": {},
"kind": null,
"parseError": "string",
"productId": null,
"rawInputStored": null,
"remainingScope": [
"string"
],
"repairApplied": "none",
"schemaNote": "string",
"status": "VALID",
"validExample": null,
"validationTest": {
"code": "string",
"expected": null,
"kind": null,
"roundTripEqual": true,
"runtime": null,
"sha256": "string",
"topLevelType": "object"
}
}Examples
curl "https://naifgravity.com/api/x402/json-validity-check"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paidconst res = await fetch("https://naifgravity.com/api/x402/json-validity-check");
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
res = httpx.get("https://naifgravity.com/api/x402/json-validity-check")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- NAIF Gravity
- Endpoint
- https://naifgravity.com/api/x402/json-validity-check
- Machine-readable
/resources/74773.json