# 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/malformed-json-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-b58d1bba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ycg7237hoBdhcQ1LHnYRM

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

Example prompt: This JSON from the LLM output has trailing commas and markdown code fences and won't parse — can you repair it and give me back clean, valid JSON? Here it is: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than probabilistic LLM-based re-generation — ideal for multi-agent pipelines where reliability and consistency matter. Best when the input is recognizably JSON-like but syntactically broken due to common LLM output artifacts (trailing commas, markdown wrapping, single quotes, truncation). Prefer alternatives if you need semantic correction or schema coercion beyond syntactic repair.

## Known failure modes

- JSON is so severely truncated or corrupted that it cannot be deterministically repaired, returning an error
- Input that is not JSON-like at all (plain text, binary) may fail with a parse error
- Edge cases in deeply nested truncated structures may produce structurally valid but semantically incorrect repairs
- Network timeout or upstream service unavailability returns a 5xx error
- Missing required raw_json parameter returns a 400 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/malformed-json-healer)

## Output

A repaired, syntactically valid JSON object with all common malformations corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for immediate programmatic use.

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