{"uid":"cap_5vOjxyOMy1S9tsq2YotwD","slug":"malformed-json-healer-1d6ad863","name":"Malformed JSON Healer","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.","url":"https://mcp-gateway.agentdiet.dev/v1/malformed-json-healer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","POST"],"type":"string"},"queryParams":{"type":"object","properties":{"raw_json":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NYwNXzz0JZkzeFRWb7r19","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs and normalizes malformed or broken JSON strings, returning a cleaned, valid JSON object with compression metadata.","exampleAgentPrompt":"Can you fix this broken JSON for me? It has some missing brackets and bad quotes: {name: 'Alice', age: 30, items: ['a', 'b'}","exampleUseCases":[{"title":"Fixing scraped API response garbage","prompt":"I scraped a webpage and the JSON response came back mangled with missing commas and unquoted keys — can you heal it so I can actually use the data? Here it is: {user: John, active: true scores: [1,2,3}"},{"title":"Recovering corrupted log file JSON","prompt":"My logging pipeline spat out some corrupted JSON entries. Can you repair this so it's valid and I can load it into my database? Entry: {'timestamp': '2024-01-01', status: error, details: {code: 500}"},{"title":"Sanitizing LLM-generated JSON before storage","prompt":"The model returned JSON with trailing commas and single quotes instead of double quotes — can you clean it up into valid JSON before I store it? Here's the raw output: {result: 'ok', data: [1, 2, 3,], meta: {version: '2'}}"}],"resultDescription":"Returns a JSON object with a 'data' field containing the repaired, valid JSON, a 'status' field ('ok' on success), and an 'roi_proof' object containing a 'compression_ratio_pct' metric indicating how much the payload was compressed or cleaned.","failureModes":["Input JSON is too severely corrupted to heal — returns error status","Missing required 'input' or 'method' fields cause validation rejection","Non-string raw_json query parameter causes schema mismatch","Network or payment settlement failure on the x402 layer returns 402"],"whenToPreferThis":"Choose this endpoint when you have a known-broken or syntactically invalid JSON string that needs to be recovered into a usable structure — especially in pipelines where LLMs, web scrapers, or legacy systems emit near-valid but unparseable JSON. Prefer this over manual regex fixes or writing custom parsers when speed and cost matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:42:32.076Z","isFirstParty":false,"canonicalSlug":"malformed-json-healer-1d6ad863"}