# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Repairs malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, fences) so multi-agent pipelines can process LLM outputs without crashing.

## Facts

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

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 agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-181325f1
```

Example prompt: Fix this broken JSON from my LLM pipeline — it has trailing commas, markdown fences, and single quotes that are making my code crash: ```{'name': 'Alice', 'age': 30,}```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline is receiving malformed JSON from language model outputs and you need a deterministic, non-probabilistic fix rather than a generative re-parse. Ideal for automated pipelines where reliability and consistency matter more than creativity, and where common LLM JSON artifacts (trailing commas, markdown fences, single quotes) are the primary failure mode.

## Known failure modes

- Input JSON too severely corrupted to deterministically repair — returns error or partial result
- Very long or deeply nested malformed JSON may exceed processing limits
- Ambiguous truncation points may result in structurally valid but semantically incorrect repairs
- Missing required raw_json parameter returns a 400 error
- Payment not included or failed returns HTTP 402

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

## Output

A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing.

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