Parsing a JSON response using Unmarshal [duplicate]
问题 This question already has answers here : JSON and dealing with unexported fields (2 answers) Closed 2 years ago . I am trying to parse a JSON response with the following code: type Token struct { access_token string `json:access_token` token_type string `json:token_type` expires_in int `json:expires_in` } homeURL := "https:/blah.com/oauth2/token" v := url.Values{} v.Set("client_id", "xxx") v.Set("client_secret", "xxx") v.Set("grant_type", "xxx") s := v.Encode() req, err := http.NewRequest(