title: How to parse through JSON object in Python
body: <p>I know there are tons of this exact question on here but I can't find an answer.</p>
  
  <p>I'm trying to use the <a href="https://developers.google.com/maps/articles/geocodestrat" rel="nofollow">Google Maps API for Geocoding</a> to go through a list of sloppy addresses, and get formatted addresses.</p>
  
  <p>I have this exact code from the Google documentation:</p>
  
  <pre><code>import urllib2
  
  address="1600+Amphitheatre+Parkway,+Mountain+View,+CA"
  url="https://maps.googleapis.com/maps/api/geocode/json?address=%s" % address
  
  response = urllib2.urlopen(url)
  jsongeocode = response.read()
  </code></pre>
  
  <p>It then says that <code>jsongeocode</code> is a JSON object. However, from what I've gathered from looking online is that this IS NOT a JSON object yet. <strong>If i'm wrong here and it is a JSON object, how do I parse it?</strong></p>
  
  <p>If I call <code>print(jsongeocode)</code> it prints what appears to be a JSON object with the proper attributes in my terminal. </p>
  
  <p>So I try to convert the <code>jsongeocode</code> object to a JSON object:</p>
  
  <pre><code>jdata = json.load(jsongeocode)
  </code></pre>
  
  <p>This gives me this error:</p>
  
  <pre><code>AttributeError: 'bytes' object has no attribute 'read'
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've switched the json function call to <code>jdata = json.loads(jsongeocode)</code>, but now the error I get is this:</p>
  
  <pre><code>TypeError: The JSON Object must be str, not 'bytes'
  </code></pre>