# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from company-enrich.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) into valid, parseable JSON for use in multi-agent pipelines.

## Facts

- Endpoint: GET https://company-enrich.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: company-enrich.agentdiet.dev
- Website: https://company-enrich.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-4ab7580c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u1yd8do3BnITb5Cb4Rrxx

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 company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-4ab7580c
```

Example prompt: The LLM just returned this broken JSON with trailing commas and markdown fences — can you clean it up and give me valid JSON I can parse? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when an AI agent or LLM pipeline receives malformed, truncated, or markdown-wrapped JSON that must be repaired deterministically before further processing. Ideal for multi-agent orchestration layers, LLM output post-processing, and any workflow where JSON validity is a hard requirement. Prefer this over custom regex heuristics or model-based repair when you need deterministic, consistent output without additional LLM inference cost.

## Known failure modes

- Input JSON is too severely truncated or corrupted to deterministically repair — returns error or best-effort partial output
- Input string is not JSON-like at all (e.g. plain prose) — may return an error or empty result
- Ambiguous repair paths where multiple valid completions exist — deterministic logic picks one but may not match original intent
- Minlength=1 not met — returns 400/validation error
- Rate limit or payment failure — returns 402 or 429

## 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://company-enrich.agentdiet.dev/v1/json-normalizer)

## Output

Returns a repaired, valid JSON object with the corrected structure, free of trailing commas, markdown fences, single quotes, or truncation artifacts, ready for programmatic parsing in downstream agent workflows.

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