# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from shopify-spy.agentdiet.dev, 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) so multi-agent pipelines never crash

## Facts

- Endpoint: POST https://shopify-spy.agentdiet.dev/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: shopify-spy.agentdiet.dev
- Website: https://shopify-spy.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-60ecf11c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lQfqll5NE_Hfqsh0Eq8Jl

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-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-60ecf11c -d '<json body>'
```

Example prompt: This JSON came back from a language model and it's broken — it has trailing commas and markdown code fences around it. Can you repair 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 fails to parse due to common syntax errors like trailing commas, markdown fences, single quotes, or truncation. It is deterministic (not probabilistic), making it reliable for production pipelines where consistent output is critical. Prefer this over writing custom regex-based repair logic or over re-prompting the LLM (which costs more tokens and time).

## Known failure modes

- Input is so severely malformed that deterministic repair is impossible — returns error with description
- Input is not JSON-like at all (e.g. plain text) — cannot repair
- Truncation is too severe to infer missing structure — partial repair or failure returned
- Empty or whitespace-only input — rejected with 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://shopify-spy.agentdiet.dev/v1/json-validator)

## Output

Returns a JSON object containing the repaired, syntactically valid JSON structure parsed from the malformed input. The agent receives a corrected and fully parseable JSON payload ready for downstream use in multi-agent pipelines.

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