# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from x402-audit.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://x402-audit.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: x402-audit.agentdiet.dev
- Website: https://x402-audit.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-f5058773
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ISuVYxYliT5AKi-OfbqZ_

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 x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-f5058773
```

Example prompt: This JSON from the LLM is broken — it has trailing commas and markdown code fences around it. Can you run it through the JSON healer and give me back the fixed, parseable version?

## When to prefer this

Use this endpoint when LLM or agent outputs need to be reliably parsed as JSON downstream and the source frequently produces common formatting errors like markdown fences, trailing commas, or single quotes. Ideal for multi-agent pipelines where a crashed JSON parser would halt the workflow. Prefer this over custom regex-based cleanup when you need deterministic, predictable repair behavior across varied malformation types.

## Known failure modes

- Input is so severely malformed that deterministic repair is impossible — returns error or empty result
- Truncation is too deep to reconstruct original intent — repaired output may not match original schema
- Very long malformed JSON strings may hit query parameter length limits since input is passed via GET
- Ambiguous repair scenarios may produce valid but semantically incorrect JSON

## 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://x402-audit.agentdiet.dev/v1/llm-json-schema-healer)

## Output

Returns a repaired, syntactically valid JSON object derived from the malformed input — with trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed where possible.

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