# 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-21).

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

## Facts

- Endpoint: GET https://serp-extract.agentdiet.dev/v1/structured-output?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- 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-4a4462d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v9pR4lU9cU7KlYHAgrWxm

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-4a4462d0
```

Example prompt: This JSON from the LLM came back broken — it has trailing commas, markdown fences, and single quotes. Can you repair it so it's valid JSON I can actually use: ```{'name': 'Alice', 'age': 30,}```?

## When to prefer this

Choose this endpoint when LLM or agent outputs produce malformed JSON that breaks downstream pipelines, especially in automated multi-agent workflows where you cannot afford manual intervention. Ideal when dealing with common LLM quirks like markdown fences, trailing commas, or single quotes that standard JSON parsers reject.

## Known failure modes

- Input JSON too severely truncated to reconstruct meaningfully
- Input is not JSON-like at all and cannot be repaired
- Ambiguous structure where multiple valid repairs are possible
- Payment failure via x402 protocol
- Network timeout on large JSON inputs

## 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/structured-output)

## Output

Returns a repaired, valid JSON object that has been cleaned of common LLM-introduced defects including trailing commas, markdown code fences, single quotes, and truncation artifacts, making it safe for downstream parsing and processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "raw_json"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "default": 20,
   "maximum": 100,
   "minimum": 1,
   "description": "Maximum number of items to return per page (1-100)"
  },
  "cursor": {
   "type": "string",
   "description": "Opaque pagination cursor for fetching the next page"
  },
  "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-4a4462d0/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)
