【发布时间】:2019-02-26 12:34:34
【问题描述】:
我收到这样的 JSON 响应。但我想删除“标题”、“原始”和“异常”。
{
"headers": {},
"original": [
{
"id": 271,
"name": "TestController",
"parent_id": null
}
],
"exception": null
}
预期输出:
{
"data": {
"id": 271,
"name": "TestController",
"parent_id": null
},
"errors": [],
"success": true,
"status_code": 200
}
【问题讨论】:
-
数据来自哪里。我的意思是它来自第三方 API?
-
没有。我已经创建了 API 并希望返回响应。但是这个额外的信息正在生成。我正在使用“jwt-auth”包进行基于令牌的身份验证。