# 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-10-21).

Repairs truncated, malformed, or markdown-wrapped JSON strings (trailing commas, single quotes, unclosed brackets) so AI agent pipelines can safely parse LLM outputs

## Facts

- Endpoint: GET https://email-verify.agentdiet.dev/v1/json-fix?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-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-e9e55bb6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fZGvWpk2MGT_8YQSQ3VdF

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-e9e55bb6
```

Example prompt: The LLM just returned this JSON string but it has trailing commas and markdown fences around it — can you clean it up so the pipeline doesn't crash: ```{"name": "Alice", "age": 30,}```?

## When to prefer this

Choose this endpoint when an AI agent or multi-agent pipeline receives JSON from an LLM that is syntactically invalid and needs deterministic, rule-based repair before further processing. Ideal for production pipelines where JSON parsing failures must be avoided and where the malformation patterns are known (trailing commas, markdown wrapping, single quotes, truncation). Prefer over prompt-retry strategies when latency and token cost matter.

## Known failure modes

- Input string is too severely truncated to reconstruct — returns error indicating unrecoverable structure
- Input is not JSON-like at all (e.g. plain prose) — may return parse failure
- Ambiguous repair scenarios where multiple valid completions exist — deterministic repair may choose one interpretation
- Network or payment (x402) issues may cause 402 or 5xx responses

## 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, schema-valid JSON object derived from the input malformed string, with common LLM-generated errors (trailing commas, markdown fences, single quotes, truncation) corrected deterministically so the output is safe to parse programmatically.

## 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-e9e55bb6/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)
