Expecting property name enclosed in double quotes - converting a string to a json object using Python
<p>I am trying to convert a string to JSON using python using the following code:</p>

<pre><code>myStr = '[{u"total": "54", u"value": "54", u"label": u"16 Sep"}, {u"total": "58", u"value": "4", u"label": u"16 Sep"}, {u"total": "65", u"value": "7", u"label": u"16 Sep"}, {u"total": "65", u"value": "0", u"label": u"16 Sep"}]'

import json
json.loads(myStr)
</code></pre>

<p>I get the following error:</p>

<pre><code>ValueError: Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
</code></pre>

<p>This makes no sense as every property has double quotes, not single ones. Any help?</p>

<p>Putting together the puzzle pieces from this question and <a href="http://stackoverflow.com/questions/39534841/getting-syntaxerror-json-parse-error-expected-when-trying-to-convert-a-str">Getting SyntaxError: JSON Parse error: Expected &#39;}&#39; when trying to convert a string into JSON using javascript</a>, you want to do:</p>

<pre><code>myStr = [{u"total": "54", u"value": "54", u"label": u"16 Sep"}, {u"total": "58", u"value": "4", u"label": u"16 Sep"}, {u"total": "65", u"value": "7", u"label": u"16 Sep"}, {u"total": "65", u"value": "0", u"label": u"16 Sep"}]

import json
print(json.dumps(myStr))
</code></pre>

<p>Then copy paste the outputted string into javascript.</p>

python json