I have json which is not decoded to struct.
I know that error somewhere in my code, but I'm stuck and do not know where the error is and what am I doing wrong
Help me please, here is my code:
type GOOGLE_JSON struct {
code string `json:"code"`
clientId string `json:"clientId"`
redirectUri string `json:"redirectUri"`
}
body := []byte(`{"code":"111","clientId":"222","redirectUri":"333"}`)
//google_json := GOOGLE_JSON{}
var google_json GOOGLE_JSON
err := json.Unmarshal(body, &google_json)
if err != nil {
fmt.Println(err)
}
fmt.Println(google_json)