# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from mesh.agentdiet.dev, 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 can safely consume structured data without crashes.

## Facts

- Endpoint: GET https://mesh.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: mesh.agentdiet.dev
- Website: https://mesh.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-580fc118
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q6Q95GzMeBfGkxHOlrG6r

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 mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-580fc118
```

Example prompt: This JSON output from my LLM has trailing commas and markdown fences wrapped around it and it's breaking my pipeline — can you repair and normalize it so it's valid JSON: ```{"name": "Alice", "score": 42,}```?

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives raw LLM-generated JSON that fails standard JSON.parse() due to common artifacts like trailing commas, markdown wrapping, or single quotes, and you need a deterministic (non-AI, rule-based) repair rather than another LLM call to fix it. Ideal for production pipelines requiring reliable, fast, low-cost JSON normalization without introducing additional model latency or hallucination risk.

## Known failure modes

- JSON too severely malformed or ambiguous to deterministically repair — returns error or best-effort partial result
- raw_json parameter missing or empty — returns 400-level validation error
- Input so truncated that structure cannot be inferred — repair may produce incorrect schema
- Payment not processed (x402) — returns 402 Payment Required before repair is attempted

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

## Output

A repaired, valid JSON object that has been cleaned of common LLM output artifacts including trailing commas, markdown code fences, single-quote delimiters, and truncation issues, ready for downstream programmatic consumption.

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