擅长:python、mysql、java
<p><strong>EDIT</strong>:我的假设不正确;因为键没有用双引号(“)括起来,所以字符串不是JSON。<a href="https://stackoverflow.com/questions/4033633/handling-lazy-json-in-python-expecting-property-name">See here</a>为了解决这个问题。</p>
<p><s>我猜你可能是<a href="http://json.org/" rel="noreferrer">JSON</a>,也就是JavaScript对象表示法。</s></p>
<p>您可以使用Python的内置<code>json</code>模块执行以下操作:</p>
<pre><code>import json
result = json.loads(u"{'code1':1,'code2':1}") # will NOT work; see above
</code></pre>