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

Accepts a malformed, truncated, or markdown-wrapped JSON string and returns a repaired, valid JSON object deterministically.

## Facts

- Endpoint: GET https://email-verify.agentdiet.dev/v1/structured-output?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-d95bdafc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fJv-Q-uX9m1y-Cgh6x_DD

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

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

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair in an automated multi-agent pipeline where LLM outputs frequently contain markdown fences, trailing commas, or single quotes. Prefer it over ad-hoc regex fixes or prompting an LLM to fix its own output, as it provides consistent, reproducible repair without stochastic variation. Ideal for production pipelines where reliability and low latency matter more than probabilistic inference.

## Known failure modes

- Input is so severely malformed that no deterministic repair is possible — returns an error or best-effort partial result
- Input string is empty or whitespace — likely returns a validation error since minLength is 1
- Input is not JSON-like at all (e.g. plain prose) — repair may fail or produce nonsensical output
- Very long truncated JSON may be completed incorrectly if context is insufficient
- Network or payment authentication failure (HTTP 402) if x402 micropayment is not provided

## 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/structured-output)

## Output

A repaired, syntactically valid JSON object derived from the input malformed string. The response resolves trailing commas, removes markdown fences, converts single quotes to double quotes, and closes truncated structures so the output can be safely parsed by downstream agents or systems.

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