【发布时间】:2018-01-12 09:04:15
【问题描述】:
我想用 python 构建一个 json 服务。程序将读取一个 json 文件然后返回。我的文件大小 1 GB。当我运行程序时,出现“MemoryError”错误。我的代码是;
def homepage(request):
file = open("file.json")
json_file = json.load(file)
return JsonResponse(json_file)
谁能帮帮我。谢谢...
【问题讨论】: