# 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) so multi-agent pipelines never crash

## Facts

- Endpoint: POST https://email-verify.agentdiet.dev/v1/malformed-json-healer?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-d10808d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0418ynWhDCnA9oEBbHgJE

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

Example prompt: This JSON output from the LLM has trailing commas and markdown fences and is breaking my pipeline — can you repair it into valid JSON: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when you have LLM or agent-generated JSON that is syntactically broken — such as trailing commas, markdown code fences, single-quoted keys/values, or truncated structures — and need a fast, deterministic fix before passing data downstream. Prefer this over writing custom regex or using a general-purpose code executor when reliability and speed matter in a multi-agent pipeline. It is especially useful in agentic workflows where LLM outputs must conform to strict schemas before being consumed by the next step.

## Known failure modes

- Input is so severely truncated or corrupted that deterministic repair is not possible — returns an error or best-effort partial result
- Input is not JSON at all (e.g. plain text or binary) — may return a validation error
- Edge cases in deeply nested or ambiguous truncations may produce structurally valid but semantically incorrect JSON
- Network or payment-related failures if x402 micropayment is not properly handled

## 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/malformed-json-healer)

## Output

Returns a repaired, valid JSON object that has been deterministically fixed from the provided malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed. The response is a JSON object containing the healed output ready for downstream use.

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