# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from x402broker.com, 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://x402broker.com/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: x402broker.com
- Website: https://x402broker.com
- Canonical page: https://www.zero.xyz/c/x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-99179dbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iDq6MeUb5gWuAnHUsFZEi

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 x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-99179dbc
```

Example prompt: This JSON from the LLM is broken — it has trailing commas, markdown code fences, and single quotes — can you repair it so it's valid JSON I can actually parse? Here's the raw string: ```json {name: 'Alice', age: 30,}```

## When to prefer this

Choose this endpoint when you need a deterministic, rule-based JSON repair rather than an LLM-based or probabilistic fix — ideal for multi-agent pipelines where consistency and reliability are critical, and when LLM outputs frequently contain predictable syntax errors like trailing commas, markdown fences, or single quotes. Prefer this over writing custom regex or using a general-purpose LLM to fix JSON, as it is purpose-built for this narrow transformation.

## Known failure modes

- Input JSON is too severely corrupted to deterministically repair
- Ambiguous truncation point where multiple valid completions exist
- Input string is not JSON-like at all (plain text, binary data)
- Extremely long JSON strings may hit query parameter length limits when passed via GET
- Schema mismatch if the repaired JSON still doesn't conform to an expected schema

## 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://x402broker.com/v1/llm-json-schema-healer)

## Output

Returns a repaired, valid JSON object where the original malformed, truncated, or markdown-wrapped input has been deterministically fixed — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing and processing.

## 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/x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-99179dbc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402broker.com](https://www.zero.xyz/host/x402broker.com/llms.txt)
