title: Error in json.loads() for data that has base64 decoding applied
body: <p>I am trying to use json.loads() in python</p>
  
  <p>I get the error:</p>
  
  <h2>    the JSON object must be str, not 'bytes'</h2>
  
  <pre><code>a = {'h': '123', 'w': '12345', 'data': "b'eyJod2lkIjpwomfcwpvepovnepovqrepniLLKJAMSNDMSNDMAWEFMOEDAad='"}
  
  
  a.update(json.loads(base64.b64decode(a['data'])))
  </code></pre>
  
  <p>Here the 'data' portion of a was being loaded in as a json dump with b64encoding.</p>
  
  <pre><code>'data':base64.b64encode(json.dumps(test).encode()); where test = some string eg('epovqrepniLLKJAMSNDMSNDMAWEFMOEDAad=')
  </code></pre>
  
  <p>I have tried using:</p>
  
  <pre><code>a.update(json.loads(base64.b64decode(a['data']).decode('utf-8')))
  </code></pre>
  
  <p>Giving me a 
      <em>'utf-8' codec can't decode bytes in position: invalid continuation byte</em></p>
  
  <p>I have also tried using <strong>decodebytes</strong> instead of <strong>b64decode</strong> to no avail.</p>
  
  <p>I'd really appreciate any help!</p>