# 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) into valid JSON to prevent multi-agent pipeline crashes.

## Facts

- Endpoint: GET https://x402-audit.agentdiet.dev/v1/json-normalizer?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-9acede47
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YVwIvgc8B_4BG2EBLQk5q

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-9acede47
```

Example prompt: This JSON string came back from my LLM and it's broken — it has trailing commas and markdown fences wrapping it. Can you repair it so it's valid JSON I can use? Here it is: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when an AI agent pipeline is receiving malformed JSON from LLM outputs and needs a deterministic, reproducible fix — not a probabilistic re-generation. Prefer this over asking the LLM to re-generate JSON when you need consistent, rule-based repair of known JSON malformation patterns (trailing commas, markdown fences, single quotes, truncation). Ideal for production multi-agent systems where pipeline reliability is critical.

## Known failure modes

- Input is so severely malformed that deterministic repair is ambiguous — endpoint may return an error or best-effort result
- Very large truncated JSON strings may have incomplete context making repair impossible
- Non-JSON content passed as raw_json (e.g. plain text) cannot be meaningfully repaired
- GET query parameter length limits may prevent passing extremely long malformed JSON strings

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

## Output

Returns a repaired, valid JSON object with the malformed input corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed. The response is a JSON object that can be safely parsed and used downstream in agent workflows.

## 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-9acede47/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)
