# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from alpha-stream.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-11-21).

Repairs malformed, truncated, or LLM-generated JSON (trailing commas, markdown fences, single quotes) into valid JSON for use in multi-agent pipelines

## Facts

- Endpoint: POST https://alpha-stream.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: alpha-stream.agentdiet.dev
- Website: https://alpha-stream.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-2b1c36a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y5KIdP52h8b7cBaYccMn5

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 alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-2b1c36a7 -d '<json body>'
```

Example prompt: This JSON came back from an LLM and it's broken — there are trailing commas, single quotes instead of double quotes, and it's wrapped in markdown code fences. Can you clean it up and give me a valid JSON object I can use in my pipeline?

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated or streamed JSON that fails to parse due to common syntax errors like trailing commas, markdown code fences, single quotes, or truncation. It is preferable to ad-hoc regex fixes or custom parsers when you need a deterministic, reliable, pay-per-call service that handles multiple JSON malformation patterns simultaneously without maintaining custom parsing code.

## Known failure modes

- Input is so severely malformed or corrupted that deterministic repair is impossible — returns error indicating unrecoverable structure
- Input string is empty or missing the required raw_json field — returns 400 validation error
- Input is not JSON-like at all (plain text, binary, HTML) — may return error or unexpected output
- Extremely large truncated JSON may have ambiguous completion — repaired result may differ from original intent

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

## Output

A repaired, valid JSON object constructed deterministically from the malformed or truncated input string, with all syntax errors (trailing commas, markdown code fences, single quotes, truncation) corrected so it can be safely parsed by downstream systems.

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