提问人:Zubty 提问时间:6/12/2023 最后编辑:Zubty 更新时间:6/12/2023 访问量:34
获取多个根的子项预期的 json 结果
Get children of multiple roots expected json result
问:
我试图找到好的巫术来找出正确的方法,但我找不到任何真正的东西......
所以问题是,如果我想获得多个根的子项,我会通过以下REST路由调用它。
GET /children?roots=2,4
结果现在可能有两种可能性
1.
[
{
root: 2,
children: [1, 2]
},
{
root: 4,
children: [3, 4]
}
]
[
{
child : 1
root : 2
},
{
child : 2
root : 2
},
{
child : 3
root : 4
},
{
child : 4
root : 4
}
]
哪一个是预期的结果,为什么?我个人会选择第一个 aproch。
答: 暂无答案
评论