← All tool references

Developer Tools · execute

JSON Viewer

Explore JSON in a searchable, collapsible read-only tree with paths and value types.

Open public tool

Overview

Category
Developer Tools
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/json-viewer

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/json-viewer/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

json · string · required
Paste valid JSON text. Use double-quoted property names and string values.
indent · number · optional
Enter the number of spaces to use for each JSON nesting level.
{
    "type": "object",
    "properties": {
        "json": {
            "type": "string",
            "description": "Paste valid JSON text. Use double-quoted property names and string values."
        },
        "indent": {
            "type": "number",
            "description": "Enter the number of spaces to use for each JSON nesting level."
        }
    },
    "required": [
        "json"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

json · string
Pretty JSON text.
valid · boolean
Browser-calculated valid.
node_type · string
Browser-calculated node type.
{
    "type": "object",
    "properties": {
        "json": {
            "type": "string",
            "description": "Pretty JSON text."
        },
        "valid": {
            "type": "boolean",
            "description": "Browser-calculated valid."
        },
        "node_type": {
            "type": "string",
            "description": "Browser-calculated node type."
        }
    },
    "additionalProperties": false
}

JSON Viewer: Format sample

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/json-viewer/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "json": "{\"a\":1}",
    "indent": 2
}'
{
    "ok": true,
    "data": {
        "slug": "json-viewer",
        "result": {
            "values": {
                "json": "{\n  \"a\": 1\n}",
                "valid": true,
                "node_type": "object"
            },
            "display": {
                "display": "{\n  \"a\": 1\n}"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.