我正在研究一些 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條經(jīng)驗 獲得超4個贊
標簽由編碼包使用encoding/json
或encoding/xml
控制在編碼和解碼期間如何解釋字段。標簽的使用已經(jīng)在這個線程中討論過:Go 中標簽的用途是什么?
- 1 回答
- 0 關注
- 285 瀏覽
添加回答
舉報
0/150
提交
取消