# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from serp-extract.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 process them without crashing

## Facts

- Endpoint: POST https://serp-extract.agentdiet.dev/v1/json-fix?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Provider: serp-extract.agentdiet.dev
- Website: https://serp-extract.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-b8a93e51
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_q6fpuaKQuBkCrM-Tz2Ydx

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 serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-b8a93e51 -d '<json body>'
```

Example prompt: The LLM just returned this JSON with trailing commas and markdown code fences and it keeps breaking my pipeline — can you clean it up and give me valid parseable JSON? Here's the raw output: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails to parse due to common LLM artifacts like trailing commas, markdown code fences, single quotes, or truncation. It is deterministic (no LLM rewriting), making it safe and predictable for production pipelines. Prefer it over prompt-engineering retries when you need a reliable, low-latency repair step that does not alter the semantic content of the JSON.

## Known failure modes

- JSON is too severely corrupted or ambiguous to deterministically repair without hallucinating structure
- Input is not JSON at all (e.g. plain text prose) — repair not possible
- Truncation is so severe that the original schema cannot be inferred, resulting in incomplete output
- Missing or empty raw_json field returns a validation error
- Extremely long JSON strings may time out or hit size limits

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

## Output

A repaired, valid JSON object that has been cleaned of markdown fences, trailing commas, single quotes, truncation artifacts, and other common LLM output malformations — ready for downstream parsing and processing in 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/serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-b8a93e51/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from serp-extract.agentdiet.dev](https://www.zero.xyz/host/serp-extract.agentdiet.dev/llms.txt)
