title: Convert stringified list of dictionaries back to a list of dictionaries
body: <p>I know that to convert a dictionary to/from a string, I use <code>json.loads</code> and <code>json.dumps</code>. However, those methods fail when given a string representing a list of dictionaries. For example, </p>
  
  <pre><code>sample_entry = [
      {"type": "test", "topic": "obama", "interval": "daily"},
      {"type": "test", "topic": "biden", "interval": "immediate"},
  ]
  </code></pre>
  
  <p>Converting that to a string with <code>str()</code> gives us </p>
  
  <pre><code>"[{'topic': 'obama', 'interval': 'daily', 'type': 'test'}, {'topic': 'biden', 'interval': 'immediate', 'type': 'test'}]"
  </code></pre>
  
  <p>Is there an easy way of converting this back to a list of dictionaries? <code>eval</code> does precisely what I want, but I'm concerned about running it on a user-supplied string. </p>
  
  <p>Is there another way of accomplishing this that will be robust in the face of varying list lengths and variable white space?</p>
  
  <p>EDIT: While json.loads(json.dumps(sample_entry)) does indeed work, json.loads(str(sample_entry)) does not. The difference, it seems, is where single quotes and double quotes are used. The data source I'm receiving this string from is unlikely to be consistent in use of ' vs ", so I'd like to account for both.</p>