Posted in

Go struct tag面试死亡八连问:json:”,omitempty”为何不生效?struct字段对齐如何影响unsafe.Sizeof?

第一章:Go struct ta … Go struct tag面试死亡八连问:json:”,omitempty”为何不生效?struct字段对齐如何影响unsafe.Sizeof?Read more

Posted in

Go map[string]Person{}转JSON为空对象{}?不是bug,是Go 1.22新增的struct字段对齐检查与json encoder字段可见性规则变更所致

第一章:Go map[strin … Go map[string]Person{}转JSON为空对象{}?不是bug,是Go 1.22新增的struct字段对齐检查与json encoder字段可见性规则变更所致Read more