JSON Examples
Ready-to-use JSON examples for developers. Copy, paste, and use in your projects.
About JSON Examples
JSON (JavaScript Object Notation) is the most widely used data format for web APIs, configuration files, and data storage. These examples demonstrate common JSON patterns you'll encounter in real-world development.
Each example below is copy-paste ready and can be opened directly in our formatter for editing. Use these as starting points for your own JSON structures.
Common JSON Use Cases
๐ REST APIs
JSON is the standard format for REST API requests and responses.
โ๏ธ Configuration
package.json, tsconfig.json, and many config files use JSON.
๐พ Data Storage
NoSQL databases like MongoDB store data in JSON-like format.
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"
}
}
]
}