擅长:python、mysql、java
<p><strong>更新</strong></p>
<p>您得到了一个期望的字符串或缓冲区-您需要使用行[0],因为结果将是1元组。。。你想选第一列也是唯一一列。在</p>
<p><strong>如果您确实想检查错误的json</strong></p>
<p>您可以尝试一下/除非:</p>
<pre><code>for row in dataJSON:
try:
jsonparse = json.loads(row)
except Exception as e:
pass
</code></pre>
<p>现在-不要像上面那样使用<code>Exception</code>而是使用当前发生的异常类型,这样就不会捕获与json加载无关的错误。。。(可能是<code>ValueError</code>)</p>