# 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/json-fix?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-b98dd7be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tPGgq0fcl61WSyFo_HiJo

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-b98dd7be
```

Example prompt: This JSON string I got from the LLM has trailing commas and markdown code fences wrapped around it — can you fix it so it parses cleanly? Here it is: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common formatting errors like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for deterministic repair rather than probabilistic regeneration, making it ideal for production pipelines where reliability matters. Prefer this over asking the LLM to regenerate when latency, cost, or idempotency are priorities.

## Known failure modes

- Input JSON is too severely corrupted or truncated to deterministically reconstruct — returns error or best-effort partial result
- Input string is not JSON-like at all — may return an error indicating unparseable input
- Network timeout or service unavailability returns a non-200 HTTP response
- Payment not processed (x402 flow failure) results in 402 response before repair is attempted

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

## Output

Returns a JSON object containing the repaired, syntactically valid version of the input JSON string, ready for programmatic parsing without errors

## 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-b98dd7be/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)
