我正在研究一些 Golang 源代码,并且对以下程序语法感到困惑。json:"make"Golang中Make字符串末尾的含义是什么?type Vehicle struct { Make string `json:"make"` Model string `json:"model"` Reg string `json:"reg"` VIN int `json:"VIN"` Owner string `json:"owner"` Scrapped bool `json:"scrapped"` Status int `json:"status"` Colour string `json:"colour"` V5cID string `json:"v5cID"` LeaseContractID string `json:"leaseContractID"`}
1 回答

Helenr
TA贡献1780条经验 获得超4个赞
标签由编码包使用encoding/json
或encoding/xml
控制在编码和解码期间如何解释字段。标签的使用已经在这个线程中讨论过:Go 中标签的用途是什么?
- 1 回答
- 0 关注
- 292 浏览
添加回答
举报
0/150
提交
取消