golang的json.Unmarshal为什么要传入引用

285 阅读1分钟

var a []struct{}

json.Unmarshal(body, &a)

这里的a为什么要用引用地址的方式?