11 Real-World Examples

Here are complete JSON examples modeled after common real-world scenarios.

Example 1 — E-Commerce Product

{
    "product_id": "PROD-001",
    "name": "Wireless Headphones",
    "price": 79.99,
    "currency": "USD",
    "in_stock": true,
    "category": "Electronics",
    "tags": ["audio", "wireless", "bluetooth"],
    "variants": [
        { "color": "Black", "sku": "WH-BLK", "stock": 42 },
        { "color": "White", "sku": "WH-WHT", "stock": 15 }
    ],
    "reviews": [
        { "user": "Alice", "rating": 5, "comment": "Great sound!" },
        { "user": "Bob", "rating": 4, "comment": "Comfortable but heavy" }
    ]
}

Example 2 — Blog Post with Comments

{
    "post": {
        "id": 42,
        "title": "Getting Started with JSON",
        "slug": "getting-started-json",
        "author": {
            "name": "Jane Dev",
            "avatar": "https://example.com/avatar.jpg"
        },
        "published": "2026-01-15",
        "content": "JSON is a lightweight data format...",
        "tags": ["json", "tutorial", "web"],
        "comments": [
            {
                "id": 1,
                "user": "Reader123",
                "text": "Very helpful, thanks!",
                "date": "2026-01-16"
            }
        ]
    }
}

Example 3 — University Course Catalog

{
    "university": "State University",
    "semester": "Fall 2026",
    "courses": [
        {
            "code": "CS101",
            "title": "Intro to Programming",
            "credits": 4,
            "instructor": "Dr. Smith",
            "schedule": {
                "days": ["Mon", "Wed"],
                "time": "10:00-11:30",
                "room": "Hall 201"
            },
            "enrolled": 45,
            "capacity": 60
        },
        {
            "code": "CS201",
            "title": "Data Structures",
            "credits": 4,
            "instructor": "Dr. Jones",
            "schedule": {
                "days": ["Tue", "Thu"],
                "time": "14:00-15:30",
                "room": "Lab 305"
            },
            "enrolled": 30,
            "capacity": 40
        }
    ]
}

Example 4 — Website Configuration (Academic Template)

{
    "name": "Researcher Name",
    "title": "PhD Candidate",
    "header": {
        "name": "Jane Doe",
        "subtitle": "Computer Science",
        "institution": "University of Excellence",
        "image": "assets/images/profile.jpg"
    },
    "sections": [
        { "file": "data/about.json", "id": "about", "enabled": true },
        { "file": "data/publications.json", "id": "publications", "enabled": true },
        { "file": "data/education.json", "id": "education", "enabled": true },
        { "file": "data/contact.json", "id": "contact", "enabled": true }
    ]
}

Example 5 — API Response with Error

{
    "success": false,
    "error": {
        "code": "AUTH_FAILED",
        "message": "Invalid API key provided",
        "details": {
            "key_prefix": "sk-ab...",
            "hint": "Check your environment variables"
        }
    },
    "timestamp": "2026-07-03T12:00:00Z"
}