{"uid":"cap_TdB819OpU0lwKkdJwAkvr","slug":"mekler-ai-json-repair-convert-f3e09d39","name":"Mekler AI JSON Repair & Convert","description":"Conservatively repair JSON syntax or convert JSON and safe YAML while recording every repair. Remove only BOM, complete JSON markdown fences and trailing commas outside strings; abstain on ambiguous or unsupported data. Up to 16000 UTF-8 input bytes, depth 24 and 4000 values. No invented values, semantic validation or code execution. Numeric values that cannot be preserved without rounding return explicit abstention.","url":"https://api.mekler.ai/v1/data/json/repair-or-convert-document?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":16000},"request_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,64}$"},"input_format":{"enum":["json","yaml"],"type":"string","default":"json"},"output_format":{"enum":["json","yaml"],"type":"string","default":"json"}}},"responseSchema":{"type":"json","example":{"output":"service: Mekler\n","reason":null,"status":"ok","outcome":"converted","limitations":["Only BOM removal, complete JSON markdown fences and trailing commas outside quoted strings are repaired; offsets refer to each transformation stage.","No missing values, keys, closing delimiters or quotes are guessed. Duplicate keys, nonfinite numbers and unsupported syntax produce abstention.","Numeric values must round-trip through their serialized representation without decimal-value loss; unsupported precision produces abstention instead of rounding.","YAML uses safe YAML 1.1 scalar interpretation; timestamps remain strings, aliases/anchors/explicit tags are rejected, and only JSON-compatible string-keyed values are supported.","Formatting and comments are not preserved. A completed conversion or abstention diagnostic is charged; no semantic truth or schema validity claim."],"observed_at":"2026-10-20T00:00:00Z","input_format":"json","output_format":"yaml","transformations":[{"offset":19,"operation":"remove_trailing_comma"}]}},"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_dDBrp9gvS7dxyUl7kc-fq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Conservatively repairs JSON syntax errors or converts between JSON and safe YAML, recording every transformation applied without inventing values.","exampleAgentPrompt":"This JSON has trailing commas and a BOM at the start — can you repair it and convert the result to YAML, and give me a list of every change that was made? Input format is JSON, output format should be YAML.","exampleUseCases":[{"title":"Fix malformed JSON config file","prompt":"This config file has trailing commas and some JSON markdown fences that need stripping — can you repair the JSON and tell me exactly what was changed, without guessing any missing values?"},{"title":"Convert JSON API response to YAML","prompt":"I have a JSON API response I need converted to safe YAML for a configuration file — can you convert it and let me know if anything couldn't be preserved exactly?"},{"title":"Audit JSON repair before pipeline ingestion","prompt":"Before I ingest this JSON into my pipeline, can you repair any minor syntax issues like trailing commas or BOM characters and give me a full record of every transformation that was applied?"}],"resultDescription":"Returns a JSON object with: 'output' (the repaired or converted document string), 'status' (ok or abstained), 'outcome' (e.g. converted, repaired, unchanged), 'reason' (explanation if abstained), 'transformations' (array of operations with offset and type), 'limitations' (list of what the service does and does not do), 'input_format', 'output_format', and 'observed_at' timestamp. If the input contains ambiguous data, unsupported syntax, duplicate keys, nonfinite numbers, or numeric values that would require rounding, the service returns an explicit abstention rather than guessing.","failureModes":["Input exceeds 16000 UTF-8 bytes — service will not process","Document nesting depth exceeds 24 levels — abstention returned","Document contains more than 4000 values — abstention returned","Duplicate keys in JSON/YAML — abstention returned instead of silently deduplicating","Nonfinite numbers (NaN, Infinity) — abstention returned","Numeric precision loss would occur on round-trip — abstention instead of rounding","Unsupported YAML features (aliases, anchors, explicit tags, non-string keys, timestamps) — abstention returned","Ambiguous or structurally broken input beyond supported repair operations — abstention returned","Invalid request_id format (must be 16-64 alphanumeric/hyphen/underscore characters)"],"whenToPreferThis":"Choose this endpoint when you need a conservative, auditable repair or format conversion of JSON or YAML with zero invented values — it is ideal for pipelines or compliance contexts where silent data mutation is unacceptable. Prefer this over generic JSON formatters when you need a full transformation log, when the input may contain BOM characters or markdown fences, or when you must distinguish between 'repaired', 'converted', and 'unchanged' outcomes. Unlike LLM-based fixers, this endpoint will explicitly abstain rather than guess at missing delimiters, keys, or values.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:44:50.102Z","isFirstParty":false,"canonicalSlug":"mekler-ai-json-repair-convert-f3e09d39"}