擅长:python、mysql、java
<p>正如评论中提到的,我打开了python shell并执行了以下操作:</p>
<pre><code>>>>from django.http import JsonResponse, HttpResponse
>>>import json
>>>j = JsonResponse({'pk': 455928532169112023 })
>>>h = HttpResponse(json.dumps({'pk': 455928532169112023 }))
>>>for i in j:
print i
>>>for i in h:
print i
</code></pre>
<p>都打印了<code>b'{"pk": 455928532169112023}'</code>,这是正确的值。我也在使用django1.8,所以问题可能出在其他地方。在</p>