# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

- Endpoint: GET https://json-repair.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: json-repair.agentdiet.dev
- Website: https://json-repair.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6f577939
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_no0-cdwjjxv708xnX5wDd

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 json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6f577939
```

Example prompt: This JSON string came back from the LLM and it's broken — has trailing commas and markdown fences around it — can you repair it so I can use it? Here it is: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails standard JSON.parse() due to common LLM artifacts like trailing commas, markdown fences, or single quotes. Prefer it over writing custom regex fixes or using a general-purpose code execution endpoint — this is a deterministic, purpose-built repair tool with predictable output. Especially useful in automated pipelines where you cannot afford crashes from malformed model output.

## Known failure modes

- Input is so severely malformed that deterministic repair is impossible, returning an error response
- Input string is empty or missing the required raw_json parameter, returning a 400-level error
- Ambiguous structure where multiple valid repairs exist, potentially returning an unexpected but valid JSON shape
- Payment not completed (x402 micropayment required), returning 402 Payment Required

## 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://json-repair.agentdiet.dev/v1/json-normalizer)

## Output

A repaired, well-formed JSON object that has had common LLM output defects corrected — including removal of markdown code fences, fixing trailing commas, converting single quotes to double quotes, and completing truncated structures — ready for downstream parsing or storage.

## 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/json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6f577939/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from json-repair.agentdiet.dev](https://www.zero.xyz/host/json-repair.agentdiet.dev/llms.txt)
