title: In Python, How to remove various unwanted quotes in a string to create/convert to a dictionary
body: <p>I have a string in the following form:</p>
  
  <pre><code>testline = "{""key1"": ""value1"", ""key2"": {""value2-subkey1"": ""value2-subvalue2""}}"
  </code></pre>
  
  <p>I would like to replace the double-double quotes with a single-double quote (") and strip the initial and final double quote to finish with a dictionary.</p>
  
  <p>So far, I've got something like this, which is very much not doing what I want.</p>
  
  <pre><code>import ast
  # testline = testline.strip(")
  testline = testline.replace('""', '"')
  testlinedict = ast.literal_eval(testline)
  </code></pre>
  
  <p>This so far yields <code>ValueError: malformed string</code></p>
  
  <p>I want the final result to be:</p>
  
  <pre><code>testlinedict = {"key1": "value1", "key2": {"value2-subkey1": "value2-subvalue2"}}
  </code></pre>