ここでは、次のように「大きな」dict を json にダンプします。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
doc = {}
# appending the doc, so that the doc is more than 2G
.....
json_doc = json.dumps(doc)
次に、次のエラーメッセージが表示されました。
File "C:\Python27\lib\site-packages\simplejson\__init__.py", line 286, in dump
s
return _default_encoder.encode(obj)
File "C:\Python27\lib\site-packages\simplejson\encoder.py", line 228, in encod
e
chunks = list(chunks)
MemoryError
どうすれば修正できますか?ありがとう!