# JSON Toolbox

> JSON Toolbox is a paid API for AI agents from bess-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Validate, pretty-print, minify, sort keys, list all paths, show shape, or extract a value from JSON text by JSONPath expression

## Facts

- Endpoint: GET https://bess-x402.onrender.com/v1/util/json?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-toolbox-c052119b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VkSTVDuPDleF1q0PmA_h9

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-toolbox-c052119b
```

Example prompt: Can you validate this JSON and tell me exactly where the error is: '{"name": "Alice", "age": 30, "items": [1, 2,]}'? Use the validate operation.

## When to prefer this

Use this endpoint when you need to inspect, debug, or transform raw JSON strings — especially when you need precise error locations for invalid JSON, or want to extract values without writing custom parsing code. Prefer this over general-purpose code execution when you want a lightweight, stateless JSON utility without spinning up a runtime environment.

## Known failure modes

- Missing 'data' query parameter returns an error
- Invalid operation name returns an error indicating the allowed operations
- 'extract' operation without a 'path' parameter returns an error
- Extremely large JSON payloads may time out or be rejected
- The path expression is syntactically invalid, returning a path parse error

## How this service works

Validate JSON (with line and column of errors), pretty-print, minify, sort keys, list all paths, show its shape, or extract a value by path like $.items[0].name or $.items[*].

## Output

Returns the result of the requested JSON operation: for 'validate', a list of syntax errors with line and column numbers (or confirmation it's valid); for 'pretty', a human-readable indented string; for 'minify', a compact single-line string; for 'sort_keys', JSON with keys sorted alphabetically at every level; for 'paths', a list of all JSONPath expressions present in the document; for 'shape', a structural skeleton showing types; for 'extract', the value(s) matched by the given JSONPath expression.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "type": "string",
       "description": "JSON text"
      },
      "path": {
       "type": "string",
       "description": "Path for extract, e.g. $.a[0].b"
      },
      "operation": {
       "type": "string",
       "description": "validate, pretty, minify, sort_keys, shape, paths or extract"
      }
     }
    }
   },
   "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-toolbox-c052119b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bess-x402.onrender.com](https://www.zero.xyz/host/bess-x402.onrender.com/llms.txt)
