擅长:python、mysql、java
<p><code>simplejson.dumps</code>的签名是(请参见<a href="http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.3/docs/module-simplejson.html#dumps" rel="nofollow">documentation</a>):</p>
<pre><code>dumps(obj, skipkeys=False, ensure_ascii=True,
check_circular=True, allow_nan=True, cls=None)
</code></pre>
<p>如您所见,没有<code>use_decimal</code>参数。。。但你这样称呼它:</p>
<pre><code>simplejson.dumps(chart_list, use_decimal=True)
</code></pre>
<hr/>
<p><strong>编辑:</strong>事实上,更多的挖掘带来了<a href="http://simplejson.googlecode.com/svn/tags/simplejson-2.1.0/docs/index.html" rel="nofollow">this other documentation</a>。似乎<code>use_decimal</code>参数是在simplejson库的某个版本中添加的。。。我建议您将库版本升级到最新版本!</p>