# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from shopify-intel.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-21).

Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, markdown fences) into valid JSON so multi-agent pipelines don't crash.

## Facts

- Endpoint: GET https://shopify-intel.agentdiet.dev/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: shopify-intel.agentdiet.dev
- Website: https://shopify-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-56d31b04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fPrUGQU9fVFNGvRNq1sue

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 shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-56d31b04
```

Example prompt: This LLM response came back as broken JSON with trailing commas and markdown fences — can you fix it so I can parse it? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that is syntactically broken and needs deterministic, rule-based repair rather than AI-based rewriting. Ideal when you need fast, cheap, and predictable JSON fixing without nondeterminism — especially for trailing commas, markdown fences, and single-quote issues that are common LLM output artifacts.

## Known failure modes

- Input JSON too severely malformed to repair deterministically — returns error or best-effort partial result
- Empty or whitespace-only raw_json input — returns validation error
- Input is not JSON at all (e.g. plain text or binary) — may return unparseable result or error
- Payment/x402 authentication failure — returns 402 status
- Extremely large inputs may hit size or timeout limits

## 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://shopify-intel.agentdiet.dev/v1/json-fix)

## Output

A repaired, syntactically valid JSON object derived from the malformed input. The response contains the corrected JSON with issues like trailing commas, markdown fences, single quotes, and truncation resolved so it can be directly parsed by downstream systems.

## 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/shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-56d31b04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from shopify-intel.agentdiet.dev](https://www.zero.xyz/host/shopify-intel.agentdiet.dev/llms.txt)
