Enterprise-Grade JSON Examples

    These advanced JSON samples are commonly used in APIs, cloud platforms, and production monitoring systems.

    OpenAPI / Swagger JSON Examples

    OpenAPI (Swagger) JSON defines REST APIs in a machine-readable format.


    {
      "openapi": "3.0.1",
      "info": {
        "title": "Orders API",
        "version": "1.0.0"
      },
      "paths": {
        "/orders": {
          "get": {
            "summary": "List all orders",
            "responses": {
              "200": { "description": "Success" }
            }
          }
        }
      }
    }
    {
      "openapi": "3.0.0",
      "info": {
        "title": "Users API",
        "description": "Manage users",
        "version": "2.1.0"
      },
      "servers": [{ "url": "https://api.example.com" }],
      "components": {
        "schemas": {
          "User": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "email": { "type": "string" }
            }
          }
        }
      }
    }
    {
      "swagger": "2.0",
      "info": {
        "title": "Auth API",
        "version": "1.2"
      },
      "basePath": "/v1",
      "schemes": ["https"],
      "paths": {
        "/login": {
          "post": {
            "consumes": ["application/json"],
            "responses": {
              "401": { "description": "Unauthorized" }
            }
          }
        }
      }
    }
    {
      "openapi": "3.0.2",
      "info": {
        "title": "Payments API",
        "version": "3.0"
      },
      "security": [{ "bearerAuth": [] }],
      "paths": {
        "/payments": {
          "post": {
            "summary": "Create payment",
            "responses": {
              "201": { "description": "Created" }
            }
          }
        }
      }
    }

    Webhook Payload JSON Examples

    Webhooks send real-time event data from external services.


    {
      "id": "evt_1P21ABC",
      "type": "payment_intent.succeeded",
      "created": 1736583000,
      "data": {
        "object": {
          "id": "pi_98321",
          "amount": 2500,
          "currency": "usd",
          "status": "succeeded"
        }
      },
      "livemode": false
    }
    {
      "event": "payment.captured",
      "payload": {
        "payment": {
          "id": "pay_KL890",
          "amount": 149900,
          "currency": "INR",
          "status": "captured"
        }
      },
      "account_id": "acc_10291",
      "created_at": "2026-01-11T09:20:00Z"
    }
    {
      "action": "opened",
      "number": 42,
      "repository": {
        "id": 112233,
        "name": "json-viewer",
        "private": false
      },
      "sender": {
        "login": "octocat",
        "id": 1
      },
      "created_at": "2026-01-11T06:40:00Z"
    }
    {
      "eventType": "user.signup",
      "eventId": "evt-77821",
      "source": "marketing-app",
      "payload": {
        "userId": "USR-9021",
        "email": "user@example.com"
      },
      "sentAt": "2026-01-11T10:00:00Z"
    }

    Kubernetes & Docker JSON Examples

    Container orchestration and runtime configurations in JSON format.


    {
      "apiVersion": "apps/v1",
      "kind": "Deployment",
      "metadata": { "name": "web-app" },
      "spec": {
        "replicas": 3,
        "template": {
          "spec": {
            "containers": [
              { "name": "app", "image": "node:18" }
            ]
          }
        }
      }
    }
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": { "name": "web-service" },
      "spec": {
        "type": "ClusterIP",
        "ports": [{ "port": 80 }],
        "selector": { "app": "web" }
      }
    }
    {
      "Id": "container_21",
      "Image": "nginx:latest",
      "State": "running",
      "Status": "Up 2 hours",
      "Ports": ["80/tcp"],
      "Names": ["nginx-web"]
    }
    {
      "containerId": "dck-8821",
      "image": "redis:7",
      "cpuLimit": "500m",
      "memoryLimit": "256Mi",
      "restartPolicy": "always",
      "createdAt": "2026-01-11T05:10:00Z"
    }

    Log & Monitoring JSON Examples

    Structured logs improve observability and debugging.


    {
      "timestamp": "2026-01-11T10:20:30Z",
      "logGroup": "/aws/lambda/orders",
      "level": "INFO",
      "message": "Order processed successfully",
      "requestId": "req-81221",
      "durationMs": 342
    }
    {
      "time": "2026-01-11T10:22:10Z",
      "resource": "vm-prod-01",
      "severity": "Warning",
      "category": "CPU",
      "usagePercent": 82,
      "threshold": 80
    }
    {
      "level": "ERROR",
      "service": "auth-service",
      "errorCode": "AUTH_401",
      "message": "Token expired",
      "userId": "USR-9021",
      "timestamp": "2026-01-11T10:30:00Z"
    }
    {
      "app": "json-viewer",
      "environment": "production",
      "event": "crash",
      "stackTrace": "TypeError: undefined is not a function",
      "file": "viewer.js",
      "line": 118,
      "reportedAt": "2026-01-11T10:35:00Z"
    }

    Format & Explore JSON Instantly

    Use these real-world JSON examples to test formatting, validation, and syntax highlighting with our online tool.

    Try JSON Viewer with these samples →