# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from x402broker.com, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-23).

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash

## Facts

- Endpoint: POST https://x402broker.com/v1/malformed-json-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Provider: x402broker.com
- Website: https://x402broker.com
- Canonical page: https://www.zero.xyz/c/x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-ca3a8686
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iVwgHLJnxSGurKGQkQmKL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-ca3a8686 -d '<json body>'
```

Example prompt: This LLM response came back as broken JSON with trailing commas and markdown code fences — can you repair it so I can parse it cleanly: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline is receiving JSON outputs that frequently contain syntax errors like trailing commas, markdown code fences, single-quoted keys, or truncated structures. It is ideal for hardening agentic pipelines that call LLMs directly and need a reliable repair step before downstream JSON parsing. Prefer it over manual regex fixes or ad-hoc parsing hacks when you need deterministic, repeatable repair behavior at low cost ($0.002/call).

## Known failure modes

- Input so severely malformed that deterministic repair is impossible — returns error or best-effort partial output
- Ambiguous truncation with multiple valid completions — may return one interpretation without guaranteeing correctness
- Very large JSON strings may hit size limits
- Semantically invalid JSON (correct syntax but wrong schema) will be returned as-is without semantic correction

## How this service works

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://x402broker.com/v1/malformed-json-healer)

## Output

A repaired, valid JSON object derived from the submitted malformed or truncated input string, with all syntax errors corrected including trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncation completed where possible.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "raw_json"
 ],
 "properties": {
  "raw_json": {
   "type": "string",
   "minLength": 1,
   "description": "Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-ca3a8686/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402broker.com](https://www.zero.xyz/host/x402broker.com/llms.txt)
