# 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-11-21).

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.

## Facts

- Endpoint: POST https://mesh.agentdiet.dev/v1/json-fix?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-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-7f72a5ce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MOdUM-fQiJBX3n0aWoCPc

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-7f72a5ce -d '<json body>'
```

Example prompt: This JSON from the LLM has trailing commas and markdown code fences and it's breaking my pipeline — can you fix it and give me back clean, valid JSON? Here's the raw output: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives JSON outputs that frequently contain LLM-specific artifacts like trailing commas, markdown code fences, single-quoted keys, or truncated structures. It is especially valuable in automated pipelines where a crashed JSON parser would halt execution and where you need a deterministic, cheap ($0.002/call) repair rather than sending the output back to the LLM for correction. Prefer this over ad-hoc regex fixes or LLM-based re-prompting when you need reliability, low latency, and idempotent behavior across retries.

## Known failure modes

- Input JSON is so severely corrupted that deterministic repair is impossible, returning an error
- Input string is completely empty or not JSON-like at all
- Ambiguous truncation where the intended structure cannot be inferred, resulting in best-effort output that may differ from original intent
- Payment authorization failure for x402 micropayment, blocking the request

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

## Output

A repaired, valid JSON object derived from the malformed input, with all syntax errors corrected — including removed trailing commas, converted single quotes to double quotes, stripped markdown fences, and closed any truncated structures — ready to be parsed by downstream pipeline steps.

## 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-7f72a5ce/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)
