# json-validate-format

> json-validate-format is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Validates a JSON string, reports parse errors with position, and returns pretty-printed and minified versions along with structural metadata like type, key count, depth, and size.

## Facts

- Endpoint: GET https://intel.rallylive.ca/data/json-validate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-validate-format-fc93a950
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AECv-xTjUF5bye09E58ve

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 json-validate-format-fc93a950
```

Example prompt: Can you validate this JSON for me and tell me if it's valid — and if not, where the error is? Also give me back a pretty-printed version and let me know the top-level type, how many keys it has, and how deep it is: {"name":"Alice","age":30,"address":{"city":"Toronto"}}

## When to prefer this

Choose this endpoint when you need to validate, format, or structurally inspect a JSON string in a single call — especially useful for catching and locating syntax errors in agent-generated JSON before downstream use. Prefer it over manual parsing when you also need structural metadata (depth, key count, size) alongside both pretty and minified output in one shot. It is purpose-built for the agentic workflow case of quickly fixing or auditing JSON without spinning up a local parser.

## Known failure modes

- Invalid or malformed input that cannot be parsed: returns error message with character/line position of failure
- Empty input: likely returns a validation error indicating no content to parse
- Non-JSON text submitted: returns parse error with position
- Network timeout or service unavailability: HTTP 5xx response
- Extremely large JSON payload may be rejected or time out

## How this service works

JSON validator and formatter: parses the text, reports the error with position if invalid, otherwise returns pretty-printed and minified versions, the top-level type, key count, depth and size. Fix agent-generated JSON fast. $0.01 per call.

## Output

Returns a validation status indicating whether the JSON is valid or not. If invalid, provides an error message with the position (line/column) of the parse failure. If valid, returns the pretty-printed JSON, the minified JSON string, the top-level type (object, array, string, etc.), the number of keys, the nesting depth, and the byte size of the payload.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-validate-format-fc93a950/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
