title: Decode JSON date from internet
body: <p>I am getting JSON from internet (Stackoverflow API) and trying to decode it:</p>
  
  <pre><code>import urllib.request
  
  url = "https://api.stackexchange.com/2.2/questions?order=desc&amp;sort=activity&amp;site=stackoverflow"
  fp = urllib.request.urlopen(url)
  mybytes = fp.read()
  mystr = mybytes.decode("utf8")
  fp.close()
  
  print(mystr)
  </code></pre>
  
  <p>I got the error:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File "code.py", line 6, in
    
        mystr = mybytes.decode("utf8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte</p>
  </blockquote>
  
  <p>Why and how can I fix it?</p>