title: Python from binary to dict
body: <p>In my project i have a binary like this:</p>
  
  <pre><code>data1 = b'"[5, \\"WEB99\\", \\"Test\\", true, \\"2018-08-12\\"]"'
  </code></pre>
  
  <p>i would extract some informations (without \), for example date1[0] -> 5 or data1[4] -> "2018-08-12"</p>
  
  <p>For doing this i try to convert my binary in a dict using json like this:</p>
  
  <pre><code>data1 = data1.decode('utf-8')
  </code></pre>
  
  <p>then</p>
  
  <pre><code>d1 = json.dumps(data1, default='utf-8')
  </code></pre>
  
  <p>but the result is a mess:</p>
  
  <blockquote>
    <p>'"\"[5, \\\"WEB99\\\", \\\"Test\\\", true, \\\"2018-08-12\\\"]\""'</p>
  </blockquote>
  
  <p>how can i convert in a pythonic way my binary data in a format for extracting values?</p>
  
  <p>Thanks in advance</p>