我们的代码里有时会遇到
{
name: "a",
id: "b",
children: null
}
这样的数据, 实际上想要的是
{
name: "a",
id: "b",
children: []
}
中间的某些数据在 Golang 的后台实现当中被作为 null 返回了. 有什么工具可以快速地对这些空数据进行填充吗?
我们的代码里有时会遇到
{
name: "a",
id: "b",
children: null
}
这样的数据, 实际上想要的是
{
name: "a",
id: "b",
children: []
}
中间的某些数据在 Golang 的后台实现当中被作为 null 返回了. 有什么工具可以快速地对这些空数据进行填充吗?