Tôi đã đoạn mã sau trong quan điểm của tôi:Làm thế nào tôi có thể thay thế simplejson với json trong python django?
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)
Kể từ simplejson
sẽ bị phản đối, tôi có thể sử dụng này
content = json.dumps(obj, **json_opts)
hay tôi cần phải làm nhiều hơn nữa?
Bạn có kiểm tra nó? Kết quả là gì? – gecco
Có thể trùng lặp: http://stackoverflow.com/questions/712791/json-and-simplejson-module-differences-in-python –
Simplejson có bị từ chối không? – Pramod