我的 View 中有以下代码:
def __init__(self, obj='', json_opts={}, mimetype="application/json", *args, **kwargs):
content = simplejson.dumps(obj, **json_opts)
super(JSONResponse, self).__init__(content, mimetype, *args, **kwargs)
由于 simplejson
将被弃用,我可以使用它吗
content = json.dumps(obj, **json_opts)
还是我需要做更多?
最佳答案
关于python - 如何在 django python 中用 json 替换 simplejson?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13005383/