阅读背景:

Golang - JSON字段设置为null vs field not there

来源:互联网 

Is there a way, in golang, to see if I can differentiate between a json field being set to null vs a json field not being there when unmarshalled into a struct? Because both set the value in the struct to be nil, but I need to know if the field was there to begin with and to see if someone set it to null.Is there a way, in golang, to see if I can diff




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: