title: httplib2.Http() - TypeError: the JSON object must be str, not 'bytes'
body: <p>This code works perfectly in Python2 but not in Python3. I went through a lot possible solution, ,but none of. them seems to work. How can I make this. work in python3?</p>
  
  <p>Error.log:</p>
  
  <pre><code>[Tue Jul 10 07:23:21.713813 2018] [wsgi:error] [pid 1667:tid 140651010107136]
      h = httplib2.Http()
  
  [Tue Jul 10 07:23:21.713843 2018] [wsgi:error] [pid 1667:tid 140651010107136]
      File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
  
  [Tue Jul 10 07:23:21.713874 2018] [wsgi:error] [pid 1667:tid 140651010107136]
      s.__class__.__name__))
  
  [Tue Jul 10 07:23:21.713907 2018] [wsgi:error] [pid 1667:tid 140651010107136]
      TypeError: the JSON object must be str, not 'bytes'
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code># Check that the access token is valid.
  access_token = credentials.access_token
  url = ('https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=%s'
         % access_token)
  h = httplib2.Http()
  result = json.loads(h.request(url, 'GET')[1])
  # If there was an error in the access token info, abort.
  if result.get('error') is not None:
      response = make_response(json.dumps(result.get('error')), 500)
      response.headers['Content-Type'] = 'application/json'
      return response
  </code></pre>