# 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 truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes

## Facts

- Endpoint: GET https://shopify-intel.agentdiet.dev/v1/json-normalizer?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-66acc7d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yrFqYzGHgNaXYzRscXhUl

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-66acc7d9
```

Example prompt: The LLM just returned this broken JSON with trailing commas and markdown fences — can you run it through the JSON normalizer to fix it so our pipeline doesn't crash: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based guessing — especially in automated multi-agent pipelines where predictable, reproducible output is critical. Prefer it over ad-hoc string manipulation when handling LLM-generated JSON with common formatting issues like trailing commas, markdown fences, or single quotes.

## Known failure modes

- Input is so severely corrupted that repair is not deterministically possible — returns error with details
- Input JSON is entirely empty or whitespace — returns validation error
- Extremely long inputs may hit query string length limits since raw_json is passed as a GET query parameter
- Ambiguous structures where intent cannot be inferred deterministically may produce unexpected output

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

## Output

A repaired, well-formed JSON object that can be parsed by standard JSON parsers, with all common LLM formatting errors corrected including trailing commas removed, markdown code fences stripped, single quotes converted to double quotes, and truncated structures closed

## 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-66acc7d9/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)
