{"uid":"cap_gJ0FY4WuEkl_PaptWVl5n","slug":"agentfund-structured-json-repair-34d75ed2","name":"AgentFund Structured JSON Repair","description":"Structured JSON Repair","url":"https://x402.agentfund.net/x402/structured_json_repair","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","description":"Raw/malformed JSON text to repair."},"coerce":{"type":"boolean","description":"Coerce types to fit the schema (default true)."},"schema":{"type":"object","description":"Optional JSON Schema to validate/coerce against."}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"age":36,"name":"Ada"},"errors":[],"changed":true,"repairs":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VUkEXpfmc_9ZtHPpS359Y","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed or invalid JSON text, optionally validating and coercing types against a provided JSON Schema","exampleAgentPrompt":"This JSON string I got back from a model output is broken — can you repair it and coerce the types to match this schema: {\"type\":\"object\",\"properties\":{\"price\":{\"type\":\"number\"},\"active\":{\"type\":\"boolean\"}}}? Here's the malformed input: '{price: \"12.5\", active: \"true\"}'","exampleUseCases":[{"title":"Fixing LLM-generated malformed JSON","prompt":"The JSON my language model returned has syntax errors — missing quotes around keys and a trailing comma. Can you repair it so it's valid JSON I can actually parse?"},{"title":"Schema-coerced JSON for data pipeline","prompt":"I have this JSON blob where all the numeric fields came back as strings. Can you fix the JSON and coerce the types to match my schema so price is a number and active is a boolean?"},{"title":"Cleaning scraped near-JSON data","prompt":"I scraped some data that's almost JSON but not quite — it has JavaScript-style unquoted keys and single quotes. Can you repair it into proper valid JSON?"}],"resultDescription":"A structured JSON response containing the repaired, valid JSON object. If a schema was provided, the output is also validated and type-coerced to conform to that schema. Returns clean, parseable JSON ready for downstream processing.","failureModes":["Input is so malformed it cannot be meaningfully repaired (returns error)","Schema mismatch where coercion is impossible (e.g. a non-numeric string to number)","Empty or null input string","Schema itself is invalid JSON Schema","Payment failure via x402 protocol before processing begins"],"whenToPreferThis":"Choose this endpoint when you have broken, malformed, or syntactically invalid JSON that needs to be repaired before use — especially useful for cleaning LLM outputs, scraped data, or hand-written JSON with common mistakes like unquoted keys, trailing commas, or wrong-typed values. Particularly valuable when you also need schema-based type coercion in a single call. Prefer this over custom parsing logic when you need a reliable, paid-guarantee repair service in an agent pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:42:09.670Z","isFirstParty":false}