code: func CredentialsFromJSON(ctx context.Context, jsonData []byte, scopes ...string) (*Credentials, error) {
  	var f credentialsFile
  	if err := json.Unmarshal(jsonData, &f); err != nil {
  		return nil, err
  	}
  	ts, err := f.tokenSource(ctx, append([]string(nil), scopes...))
  	if err != nil {
  		return nil, err
  	}
  	return &DefaultCredentials{
  		ProjectID:   f.ProjectID,
  		TokenSource: ts,
  		JSON:        jsonData,
  	}, nil
  }
docs: // CredentialsFromJSON obtains Google credentials from a JSON value. The JSON can
  // represent either a Google Developers Console client_credentials.json file (as in
  // ConfigFromJSON) or a Google Developers service account key file (as in
  // JWTConfigFromJSON).