title: Python - Convert a bytes array into JSON format
body: <p>I want to parse a <code>bytes</code> string in JSON format to convert it into python objects. This is the source I have:</p>
  <pre><code>my_bytes_value = b'[{\'Date\': \'2016-05-21T21:35:40Z\', \'CreationDate\': \'2012-05-05\', \'LogoType\': \'png\', \'Ref\': 164611595, \'Classe\': [\'Email addresses\', \'Passwords\'],\'Link\':\'http://some_link.com\'}]'
  </code></pre>
  <p>And this is the desired outcome I want to have:</p>
  <pre><code>[{
  &quot;Date&quot;: &quot;2016-05-21T21:35:40Z&quot;,
  &quot;CreationDate&quot;: &quot;2012-05-05&quot;,
  &quot;LogoType&quot;: &quot;png&quot;,
  &quot;Ref&quot;: 164611595,
  &quot;Classes&quot;: [
    &quot;Email addresses&quot;,
    &quot;Passwords&quot;
  ],
  &quot;Link&quot;: &quot;http://some_link.com&quot;}]
  </code></pre>
  <hr />
  <p>First, I converted the bytes to string:</p>
  <pre><code>my_new_string_value = my_bytes_value.decode(&quot;utf-8&quot;)
  </code></pre>
  <p>but when I try to invoke <code>loads</code> to parse it as JSON:</p>
  <pre><code>my_json = json.loads(my_new_string_value)
  </code></pre>
  <p>I get this error:</p>
  <pre><code>json.decoder.JSONDecodeError: Expecting value: line 1 column 174 (char 173)
  </code></pre>