google/oauth2client — pull request #40 by dustinfarris (2014-08-19 03:32:09+00:00)
Title: Handle response bytes in OAuth2Credentials

I'm not sure how `simplejson.loads` slipped into this particular spot.

[In master](https://github.com/google/oauth2client/blob/master/oauth2client/client.py#L735) it is `json.loads` which would work just fine here. I am unable to pinpoint where that was changed.

At any rate, `simplejson` wants a string where `json` would have wanted bytes so we have to convert the response data.

I noticed in #34 (upon which this branch is based) there is a lot of try/except going on with json decoding. I don't know what the anticipated edge cases are, but we may be over-hacking it.

Regardless, this PR makes OAuth2Credentials usable along with the other objects that depend on it (e.g. SignedJwtAssertionCredentials)

/cc @pferate