# 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 malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fences) into valid JSON so multi-agent pipelines don't crash.

## Facts

- Endpoint: POST https://x402broker.com/v1/json-normalizer?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-e1d828e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__SoR4ZK_uZHDmixfUytJA

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

Example prompt: This LLM output is broken JSON — it has trailing commas and markdown backtick fences — can you repair it into valid JSON so my pipeline doesn't crash? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline regularly receives broken JSON (trailing commas, markdown fences, single quotes, truncation) and needs a deterministic, cheap ($0.002/call) repair step rather than asking the LLM to retry. Ideal for production pipelines where reliability and cost predictability matter more than probabilistic LLM re-generation.

## Known failure modes

- Input is so severely malformed it cannot be deterministically repaired — returns error with explanation
- Input contains non-JSON content entirely (e.g. plain text with no JSON structure) — may return parse error
- Truncated JSON where the intended structure is ambiguous — repair may not match original intent
- Payment failure via x402 protocol — returns 402 status
- Empty or whitespace-only raw_json input — returns validation error

## 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-normalizer)

## Output

A repaired, valid JSON object corrected from the malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing and 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-e1d828e1/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)
