title: ast.literal_eval ValueError('malformed string')
body: <p>I have a string of the form <code>{"Top":[{"A":1,"B":721.0,"C":false}]}</code> which I would like to convert into a Python collection.</p>
  
  <p>I tried using <code>ast.literal_eval</code> like this:</p>
  
  <pre><code>x = '{"Top":[{"A":1,"B":721.0,"C":false}]}'
  print ast.literal_eval(x)
  </code></pre>
  
  <p>However, I am getting this error:</p>
  
  <pre><code>File "queryFlights.py", line 19, in &lt;module&gt;
      print ast.literal_eval(x)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 80, in literal_eval
      return _convert(node_or_string)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 63, in _convert
      in zip(node.keys, node.values))
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 62, in &lt;genexpr&gt;
      return dict((_convert(k), _convert(v)) for k, v
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 60, in _convert
  
      return list(map(_convert, node.elts))
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 63, in _convert
      in zip(node.keys, node.values))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 62, in &lt;genexpr&gt;
      return dict((_convert(k), _convert(v)) for k, v
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 79, in _convert
  
      raise ValueError('malformed string')
  ValueError: malformed string
  </code></pre>
  
  <p>How can I convert that string into a collection?</p>