# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from company-enrich.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-21).

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash

## Facts

- Endpoint: GET https://company-enrich.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: company-enrich.agentdiet.dev
- Website: https://company-enrich.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-a43f0ff3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wm0hQjjUNoJTAkleLBYWq

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 company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-a43f0ff3
```

Example prompt: This JSON from our LLM output is broken — it has trailing commas and markdown fences wrapping it — can you repair it so it parses cleanly? Here it is: ```{"name": "Acme", "revenue": 5000000,}```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives JSON from an LLM or external tool that fails standard JSON.parse() due to common LLM formatting artifacts like trailing commas, markdown code fences, single quotes, or truncation. It is a deterministic (non-AI) repair tool, making it reliable and predictable for automated pipelines where consistency matters. Prefer it over ad-hoc regex fixes or asking an LLM to re-parse, as it provides structured, repeatable correction without additional inference cost.

## Known failure modes

- JSON is so severely malformed it cannot be deterministically repaired — returns error
- Input string is not JSON at all (e.g. plain prose) — may return parsing error
- Extremely long truncated JSON where closing structure is ambiguous — repair may be incomplete
- Empty or whitespace-only input — returns validation error

## 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://company-enrich.agentdiet.dev/v1/json-fix)

## Output

A repaired, valid JSON object that has had common LLM output defects corrected, including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncation resolved — ready to be parsed and consumed by downstream pipeline steps.

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