获得徽章 5
有个需要。有大佬有使用过类似的库没
// 转换前 这是一个是任何类型的数据对象 非固定的
{
"success": true,
"data": [
{
"key": "BD",
"description": "xxxx",
"title": "萧平",
"class": "notice",
"status": "unRead"
},
// ...其他数据
],
"total": 999,
"errorCode": 0
}
// 假定配置 这里的配置可以根据库的格式更改 start
{
"tag": "success",
// 例如 data.&[key] 代表 data 数组中的 key 字段
"list":[
{
"id": "data.&[key]",
"remark": "data.&[description]",
"name": "data.&[title]",
"type": "data.&[class]",
"status": "data.&[status]"
}
],
"count": "total",
"code": "errorCode"
};
// 转换后
{
"tag": true,
"list": [
{
"id": "BD",
"remark": "xxxx",
"name": "萧平",
"type": "notice",
"status": "unRead"
},
// ...其他数据
],
"count": 999,
"code": 0
}
展开
评论
下一页
个人成就
文章被阅读 336
掘力值 12
收藏集
9
关注标签
45
加入于