# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

- Endpoint: POST https://github-audit.agentdiet.dev/v1/structured-output?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: github-audit.agentdiet.dev
- Website: https://github-audit.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-b28505f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_psq6lo6xWQgwI0tg_ZRU4

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 github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-b28505f8 -d '<json body>'
```

Example prompt: This LLM response came back as broken JSON with trailing commas and markdown code fences — can you repair it so it parses cleanly? Here it is: ```json {name: 'Alice', age: 30,} ```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair of LLM outputs in a multi-agent pipeline and cannot tolerate parse errors. It is especially useful when dealing with markdown-wrapped, trailing-comma, or single-quoted JSON that fails standard parsers. Prefer this over asking the LLM to re-generate if you need a fast, cheap, and predictable fix without an additional model call.

## Known failure modes

- Input is so severely truncated that meaningful repair is impossible — returns error or best-effort partial result
- Input is not JSON-like at all (plain prose, binary data) — may return error or empty object
- Ambiguous structure where multiple valid repairs exist — deterministic approach picks one which may not match original intent
- Payment required (HTTP 402) if x402 payment header is missing or insufficient

## 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://github-audit.agentdiet.dev/v1/structured-output)

## Output

Returns a repaired, valid JSON object parsed from the malformed input string, with common LLM output issues such as trailing commas, markdown code fences, single-quoted keys/values, and truncation corrected deterministically.

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