# 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-10-23).

Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs so multi-agent pipelines can safely process them without crashing.

## Facts

- Endpoint: POST https://github-audit.agentdiet.dev/v1/json-validator?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-23
- 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-70cb75f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I50p8zRYxx77h9EptsivK

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

Example prompt: This JSON came back from another model and it won't parse — it has trailing commas and markdown fences around it. Can you fix it so it's valid JSON I can work with?

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails parsing due to common issues like trailing commas, markdown code fences, or single-quote delimiters. It is especially valuable in automated A2A workflows where you cannot tolerate downstream crashes from malformed model outputs and need a deterministic (not generative) fix.

## Known failure modes

- Input is so severely malformed or incomplete that deterministic repair is impossible
- raw_json field is empty or missing, returning a 400 validation error
- JSON structure is ambiguous enough that repair produces an incorrect but syntactically valid result
- Endpoint returns non-2xx if payment (x402) is not fulfilled

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

## Output

Returns a JSON object containing the repaired, valid JSON — free of trailing commas, markdown fences, and single-quote delimiters — ready for downstream parsing and processing by agent pipelines.

## 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-70cb75f6/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)
