NutzCN Logo
问答 nutz 里面的HTTP怎么支持jsonAPI?
发布于 2288天前 作者 caca 1420 次浏览 复制 上一个帖子 下一个帖子
标签:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
"data": [{
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!",
"body": "The shortest article. Ever."
},
"relationships": {
"author": {
"data": {"id": "42", "type": "people"}
}
}
}],
"included": [
{
"type": "people",
"id": "42",
"attributes": {
"name": "John"
}
}
]
}

Content-Type: application/vnd.api+json这种类型的数据json适配器可以解析吗?

2 回复

也就是JsonAdatpor嘛, 如果不够用, 继承它进行扩展

添加回复
请先登陆
回到顶部