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

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash

## Facts

- Endpoint: POST https://x402broker.com/v1/json-validator?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-23
- 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-48d7114a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_djDySgI70WAjITzZvY87h

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-48d7114a -d '<json body>'
```

Example prompt: Can you fix this broken JSON from my LLM pipeline — it has trailing commas, single quotes, and markdown code fences wrapping it, and I need a clean parseable object back: ```json {'name': 'Alice', 'age': 30,}```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than probabilistic LLM re-generation — ideal for production multi-agent pipelines where you need consistent, predictable fixes for common LLM output artifacts like trailing commas, single quotes, and markdown fences. Prefer this over asking another LLM to fix the JSON when you need low latency, low cost ($0.002/call), and reproducible behavior.

## Known failure modes

- Input is so severely malformed it cannot be deterministically repaired — returns error with details
- Input string is empty or missing raw_json field — returns 400-level validation error
- JSON is structurally ambiguous after truncation with multiple valid repairs — may return best-guess result
- Payment not authorized via x402 — returns 402 Payment Required
- Network timeout on large 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://x402broker.com/v1/json-validator)

## Output

Returns a repaired, valid JSON object with the malformed input corrected — trailing commas removed, single quotes converted to double quotes, markdown fences stripped, and truncated structures closed. The response is a JSON object containing the fixed output ready for downstream consumption.

## 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-48d7114a/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)
