# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from arxiv-digest.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, unclosed brackets, single quotes) so multi-agent pipelines can continue without crashing.

## Facts

- Endpoint: POST https://arxiv-digest.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: arxiv-digest.agentdiet.dev
- Website: https://arxiv-digest.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-d521e34a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HHY7MwqFRlCBK7fTcvtZg

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 arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-d521e34a -d '<json body>'
```

Example prompt: This JSON string from our LLM has trailing commas, markdown code fences, and a truncated closing bracket — can you repair it so I can parse it properly: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when your agent pipeline receives LLM-generated JSON that fails standard parsing due to common LLM output artifacts like trailing commas, markdown code fences, single quotes, or truncation. It is ideal for multi-agent orchestration layers where downstream steps require valid JSON and you cannot afford a crash. Prefer this over a generic JSON linter when you need deterministic, automated repair rather than human-readable error messages.

## Known failure modes

- Input is so severely truncated or corrupted that valid structure cannot be inferred — returns an error or best-effort partial repair
- Input is not JSON-like at all (plain text, HTML, binary) — returns an error indicating unparseable input
- Ambiguous repair paths where multiple valid completions exist — may return the most probable interpretation with a confidence signal
- Network or payment authorization failure (HTTP 402 if payment not attached)

## 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://arxiv-digest.agentdiet.dev/v1/malformed-json-healer)

## Output

A repaired, well-formed JSON object derived from the malformed input, with all structural issues (trailing commas, markdown fences, single quotes, unclosed brackets, truncation) corrected so it can be parsed by standard JSON parsers.

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