JSON 示例库
各场景 JSON 样例,点击即可复制到格式化工具。
API 响应(分页列表)
{
"code": 0,
"message": "ok",
"data": {
"list": [
{ "id": 1, "name": "foo", "active": true },
{ "id": 2, "name": "bar", "active": false }
],
"total": 2,
"page": 1,
"pageSize": 10
}
}嵌套配置文件
{
"app": {
"name": "my-app",
"port": 8080,
"database": {
"host": "localhost",
"port": 5432,
"pool": { "min": 2, "max": 10 }
}
},
"logging": ["info", "warn", "error"]
}数组 of 对象
[
{ "type": "doc", "id": 101, "tags": ["a", "b"] },
{ "type": "img", "id": 102, "url": "https://example.com/x.png" },
{ "type": "note", "id": 103, "text": "hello" }
]GeoJSON Feature
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [125.6, 10.1]
},
"properties": {
"name": "Dinagat Islands"
}
}用户档案
{
"userId": "u_001",
"profile": {
"name": "张三",
"age": 28,
"address": { "city": "北京", "zip": "100000" }
},
"hobbies": ["reading", "coding"],
"verified": true
}商品(电商)
{
"sku": "SKU-9923",
"title": "无线耳机",
"price": 199.00,
"currency": "CNY",
"stock": 150,
"attributes": { "color": "black", "bluetooth": "5.2" },
"images": ["1.jpg", "2.jpg"]
}