Most people searching for "sample JSON" need the same few shapes: a list of people, some nested data, and an API response. Every example below is valid JSON you can paste straight into a parser, database or test.
Sample employee JSON
An array of objects, each with every JSON type: string, number, boolean, null, nested object and array.
[
{
"id": 1001,
"name": "Asha Rao",
"email": "[email protected]",
"department": "Engineering",
"salary": 145000,
"isActive": true,
"hiredAt": "2019-04-01",
"manager": null,
"skills": ["go", "kubernetes"],
"address": { "city": "Bengaluru", "country": "IN" }
},
{
"id": 1002,
"name": "Daniel Okafor",
"email": "[email protected]",
"department": "Engineering",
"salary": 128000,
"isActive": true,
"hiredAt": "2021-09-13",
"manager": 1001,
"skills": ["typescript", "react"],
"address": { "city": "Lagos", "country": "NG" }
}
]
manager holds another employee's id, which is how you model relationships in flat JSON. The top-level employee is null.
Sample student JSON
{
"students": [
{
"id": "S-001",
"name": "Liam Chen",
"age": 20,
"course": "Computer Science",
"enrolledAt": "2024-08-26T09:00:00Z",
"grades": { "math": 91, "physics": 84, "programming": 97 },
"scholarship": true
},
{
"id": "S-002",
"name": "Priya Nair",
"age": 19,
"course": "Economics",
"enrolledAt": "2025-08-25T09:00:00Z",
"grades": { "math": 78, "statistics": 88 },
"scholarship": false
}
]
}
grades is an object (subject → score) rather than an array because each subject appears once. Use an array when order matters or keys repeat.
Nested JSON example
Deep nesting shows up in orders, configs and API payloads. This order has an object inside an array inside an object:
{
"orderId": "ord_8f3a2c",
"customer": {
"id": "cus_19b7",
"shipping": {
"line1": "12 MG Road",
"city": "Bengaluru",
"geo": { "lat": 12.9756, "lng": 77.6066 }
}
},
"items": [
{ "sku": "TSHIRT-BASIC", "qty": 2, "options": { "size": "M", "color": "black" } }
]
}
The JSON Pointer to the color is /items/0/options/color. In JavaScript it is order.items[0].options.color.
Sample API response JSON
A list endpoint usually wraps records in an envelope with pagination:
{
"data": [
{ "id": "ord_8f3a2c", "status": "shipped", "total": { "amount": 5998, "currency": "USD" } }
],
"meta": { "pagination": { "page": 1, "perPage": 20, "total": 37, "totalPages": 2 } },
"links": { "next": "https://api.example.com/v1/orders?page=2", "prev": null },
"errors": []
}
And the matching error response:
{
"data": null,
"errors": [
{ "code": "not_found", "message": "Order ord_999 does not exist", "field": "id" }
]
}
Money is stored in cents (5998) to avoid floating-point rounding. The full version is in the Sample API Response template.
Sample JSON body for Postman
In Postman choose Body → raw → JSON, which sets Content-Type: application/json:
{
"name": "Asha Rao",
"email": "[email protected]",
"role": "admin",
"sendWelcomeEmail": false,
"tags": ["beta", "internal"]
}
Use {{baseUrl}} or {{userEmail}} variables for values that differ per environment. Postman's dynamic variables such as {{$randomEmail}} generate fresh fake values on every send.
Importing sample JSON into MongoDB
mongoimport accepts two shapes:
# A file that is one big array
mongoimport --db test --collection employees --file employees.json --jsonArray
# A file with one document per line (JSON Lines)
mongoimport --db test --collection employees --file employees.jsonl
Forgetting --jsonArray on an array file is the most common import error. See JSON vs JSONL for when to use which.
Loading sample JSON into Power BI
- Get Data → JSON and pick the file.
- Power Query shows a List. Choose To Table.
- Click the expand icon on the column to turn each record's fields into columns. Expand nested objects (like
address) the same way.
Arrays inside records (like skills) expand into extra rows, so decide whether you need them before expanding. To style the report, see Power BI theme JSON.
Generating a large JSON file
For load tests you need thousands of rows. Generate them rather than writing them by hand:
import json, random
depts = ["Engineering", "Sales", "People"]
rows = [
{
"id": i,
"name": f"Employee {i}",
"email": f"employee{i}@example.com",
"department": random.choice(depts),
"salary": random.randint(40_000, 180_000),
"isActive": random.random() > 0.1,
}
for i in range(1, 10_001)
]
with open("employees.json", "w") as f:
json.dump(rows, f, indent=2)
For files over a few hundred MB, write JSON Lines instead so tools can stream them line by line.
Rules that keep sample data valid
- Keys and strings use double quotes. Single quotes are invalid.
- No trailing commas and no comments.
- One root value per file (an object or an array).
- Dates are ISO 8601 strings; JSON has no date type.
- Use
example.comemails and fake phone numbers. Never copy production records into fixtures.
Make it your own
Open the Sample JSON Data template in the studio and ask in plain English: "add 20 students with a city field", "give every product a discount price", or "write a JSON Schema for the employees array". Each change shows up as a diff you accept or reject.