# 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 malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, fences) so multi-agent pipelines can reliably parse LLM outputs

## Facts

- Endpoint: POST https://email-verify.agentdiet.dev/v1/json-fix?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-31ae58c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q6TBpJDk5q5jG8sS49jlX

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-31ae58c1 -d '<json body>'
```

Example prompt: This LLM output came back as broken JSON with trailing commas and markdown fences — can you fix it so I can parse it? Here's the raw string: ```{"name": "Alice", "score": 42,}```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed JSON outputs that need deterministic, rule-based repair rather than AI-generated guessing. Ideal for production pipelines where reliability and idempotency matter — supports Idempotency-Key headers for safe retries. Best when the malformation is systematic (trailing commas, markdown wrapping, single quotes) rather than deeply corrupted data.

## Known failure modes

- Input JSON too severely truncated or corrupted to deterministically reconstruct — returns error or best-effort partial result
- Input string is not JSON at all (plain text, binary) — may return parsing failure
- Ambiguous repair cases where multiple valid interpretations exist — deterministic heuristics may choose one silently
- Empty or whitespace-only input — returns validation error
- Network timeout or service unavailability — HTTP 5xx response

## 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-fix)

## Output

A repaired, valid JSON object reconstructed from the malformed input string, with common LLM-output issues (trailing commas, markdown fences, single quotes, truncation) corrected deterministically so downstream parsers can process it without errors

## 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-31ae58c1/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)
