我期待 {"a":"42","b":"78"} 來自以下代碼,但它沒有這樣做。package mainimport ( "encoding/json" "fmt")type S struct { A int `json:"a,string"` B *int `json:"b,string"`}func main() { var s S json.Unmarshal([]byte(`{"a":"42","b":"78"}`), &s) m, _ := json.Marshal(s) fmt.Println(string(m))}難道我做錯了什么?
- 1 回答
- 0 關(guān)注
- 202 瀏覽
添加回答
舉報
0/150
提交
取消