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>

<pre><code>import json
myStr = '[{"total": 54, "value": 54, "label": "u16 Sep"}, {"total": 58, "value": 4, "label": "u16 Sep"}, {"total": 65, "value": 7, "label":" u16 Sep"}, {"total": 65, "value": 0,"label": "u16 Sep"}]'
obj = json.loads(myStr)
print(repr(obj))
</code></pre>

<p>You try load incorrect JSON, you can check it <a href="http://json.parser.online.fr/" rel="nofollow">here</a>. I edit your json and it work.</p>

<p><a href="http://www.w3schools.com/json/json_syntax.asp" rel="nofollow">Here You find JSON Syntax rules</a></p>

python json