# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

- Endpoint: POST https://email-verify.agentdiet.dev/v1/json-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: email-verify.agentdiet.dev
- Website: https://email-verify.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-8326c46f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h-Md6kzW1Y6IHiiKyp4fy

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 email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-8326c46f -d '<json body>'
```

Example prompt: This JSON string came back from an LLM with trailing commas and markdown fences and it's breaking my pipeline — can you repair it and return valid JSON? Here it is: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than probabilistic LLM-based fixing — ideal for high-throughput multi-agent pipelines where consistency and speed matter. Prefer it when dealing with common LLM JSON failure modes: trailing commas, markdown code fences, single quotes, or mild truncation. Best suited for automated pipelines that cannot tolerate parse errors and need a reliable, cheap ($0.002/call) repair step between agent hops.

## Known failure modes

- Input is so severely malformed that deterministic repair is impossible — returns error response
- Input is not JSON-like at all (e.g. plain text or binary) — repair may fail or return unexpected structure
- Truncation is too severe to infer intended structure — output may be incomplete
- Network or service unavailability returns HTTP 5xx
- Insufficient payment or missing x402 payment header returns HTTP 402

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

## Output

A JSON object containing the repaired, valid JSON parsed from the malformed input string. The response allows downstream agents and pipeline steps to safely parse and consume the corrected data without crashing.

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