{"uid":"cap_MP820QUH8WX7THzyYW6G5","slug":"json-repair-service-06616808","name":"JSON Repair Service","description":"Fix invalid, malformed, or truncated JSON — repairs trailing commas, single quotes, unquoted keys, and cut-off LLM output; returns the parsed object plus corrected JSON text. Deterministic, no LLM.","url":"https://toolbelt402.tpoborne.workers.dev/json/repair","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Possibly-broken JSON as a string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EBpiI-Lv1IyDghhC1MZnV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fixes invalid, malformed, or truncated JSON strings and returns both the parsed object and the corrected JSON text, deterministically without an LLM.","exampleAgentPrompt":"This JSON string from an LLM response got cut off and has trailing commas and single quotes — can you repair it and give me back the fixed JSON text and parsed object? Here it is: {'name': 'Alice', 'age': 30, 'hobbies': ['reading', 'coding',}","exampleUseCases":[{"title":"Recovering truncated LLM output","prompt":"The model's response got cut off mid-JSON and now it won't parse — can you fix this broken JSON for me: {\"users\": [{\"id\": 1, \"name\": \"Bob\"}, {\"id\": 2, \"name\":"},{"title":"Cleaning single-quoted JSON from legacy system","prompt":"Our legacy system exports JSON with single quotes and unquoted keys, and it's breaking our pipeline — can you repair this so it's valid JSON: {name: 'Alice', city: 'London', active: true}"},{"title":"Fixing trailing-comma JSON in CI pipeline","prompt":"Our linter is failing because this config JSON has trailing commas everywhere — can you fix it and return the corrected text? Here: {\"timeout\": 30, \"retries\": 3, \"debug\": false,}"}],"resultDescription":"Returns the successfully parsed JavaScript/JSON object along with the corrected, valid JSON string. If repair is possible, both the structured object and the fixed text are provided so the caller can use either form downstream.","failureModes":["Input is so corrupted it cannot be salvaged into valid JSON — returns an error indicating repair failure","Input is not JSON-like at all (e.g. plain prose) — repair cannot proceed","Extremely large JSON strings may hit payload size limits","Network or worker timeout for unusually complex repair jobs"],"whenToPreferThis":"Choose this endpoint when you have syntactically broken JSON — from LLM output, legacy systems, or manual editing — that needs deterministic, rule-based repair without invoking another LLM. Prefer it over LLM-based JSON fixing when you need reproducibility, low cost, and fast turnaround. It specifically excels at trailing commas, single-quoted strings, unquoted keys, and truncated output — common failure modes from generative AI pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:39:58.963Z","isFirstParty":false}