JSON resource

JSON examples for APIs, configuration and tests

Copyable, valid JSON examples for API responses, application configuration and nested data. Download the files or inspect them in the private browser viewer.

These examples are small enough to read in a tutorial and realistic enough to use in a test, mock response or code review. They use fictional data. Every downloadable file is valid JSON and can be opened in the Tool Kumar viewer.

API response

A paginated response often combines a list with metadata. Keeping the items in an array gives clients a stable place to iterate, while the page object records how to request the next result.

JSON
{
  "data": [
    {"id": "usr_1042", "name": "Asha Rao", "role": "editor"},
    {"id": "usr_1043", "name": "Noah Chen", "role": "reviewer"}
  ],
  "page": {
    "number": 1,
    "size": 2,
    "total": 2,
    "next": null
  }
}

Download api-response.json

Application configuration

Configuration documents work well when each setting has one clear type. Keep secrets out of files that will be committed or shared. Use environment variables or a secret store for credentials.

JSON
{
  "app": {
    "name": "Canvas",
    "port": 8080,
    "debug": false
  },
  "features": {
    "comments": true,
    "uploads": false
  },
  "allowedOrigins": ["https://example.com"]
}

Download app-config.json

Nested and tabular data

JSON can represent nested objects and arrays without flattening them into column names. This shape is useful for testing tree viewers, table conversion and code generators.

JSON
{
  "orderId": "ord_7021",
  "customer": {"name": "Mina Patel", "country": "IN"},
  "lines": [
    {"sku": "notebook-a5", "quantity": 2, "price": 6.5},
    {"sku": "pen-blue", "quantity": 3, "price": 1.25}
  ],
  "paid": true
}

Download nested-order.json

Use these files

The downloadable fixture files are dedicated to the public domain under CC0 1.0. Copy, adapt and include them in documentation or tests without asking for permission.

  • Paste an example into the JSON viewer to format it, search it or switch to a table view.
  • Use the downloads as fixtures in parser tests, documentation snippets or API mock responses.
  • Link to this page when a reader needs a short, valid document that demonstrates a real data shape.