JSON Examples

Ready-to-use JSON examples for developers. Copy, paste, and use in your projects.

Simple Object

Basic key-value pairs

{
  "name": "John Doe",
  "email": "[email protected]",
  "age": 30,
  "active": true
}

API Response

Typical REST API response structure

{
  "status": "success",
  "code": 200,
  "data": {
    "user": {
      "id": 12345,
      "username": "developer",
      "email": "[email protected]",
      "created_at": "2026-01-14T10:30:00Z"
    }
  },
  "meta": {
    "request_id": "abc-123-def",
    "response_time_ms": 45
  }
}

Array of Objects

List of items with properties

{
  "products": [
    {
      "id": 1,
      "name": "Laptop",
      "price": 999.99,
      "in_stock": true
    },
    {
      "id": 2,
      "name": "Mouse",
      "price": 29.99,
      "in_stock": true
    },
    {
      "id": 3,
      "name": "Keyboard",
      "price": 79.99,
      "in_stock": false
    }
  ]
}

Nested Structure

Deeply nested JSON data

{
  "company": {
    "name": "Tech Corp",
    "departments": {
      "engineering": {
        "manager": "Alice",
        "teams": {
          "frontend": ["Bob", "Charlie"],
          "backend": ["Dave", "Eve"],
          "devops": ["Frank"]
        }
      },
      "marketing": {
        "manager": "Grace",
        "budget": 50000
      }
    }
  }
}

Package.json

Node.js package configuration

{
  "name": "my-project",
  "version": "1.0.0",
  "description": "A sample Node.js project",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "dev": "nodemon index.js",
    "test": "jest"
  },
  "dependencies": {
    "express": "^4.18.0",
    "lodash": "^4.17.21"
  },
  "devDependencies": {
    "jest": "^29.0.0",
    "nodemon": "^3.0.0"
  },
  "license": "MIT"
}

GeoJSON

Geographic data format

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-73.9857, 40.7484]
      },
      "properties": {
        "name": "Empire State Building",
        "city": "New York"
      }
    }
  ]
}

More Examples