diff --git a/django/http/response.py b/django/http/response.py
index 324f67c847b5d18ccad613a48560ad0e8fea0768..afa8ac91de9136a63c378a26760b6410ff2557fa 100644
a
|
b
|
from django.conf import settings
|
14 | 14 | from django.core import signals |
15 | 15 | from django.core import signing |
16 | 16 | from django.core.exceptions import DisallowedRedirect |
17 | | from django.core.serializers.json import DjangoJSONEncoder |
18 | 17 | from django.http.cookie import SimpleCookie |
19 | 18 | from django.utils import six, timezone |
20 | 19 | from django.utils.encoding import force_bytes, force_text, iri_to_uri |
… |
… |
class JsonResponse(HttpResponse):
|
473 | 472 | to ``True``. |
474 | 473 | """ |
475 | 474 | |
476 | | def __init__(self, data, encoder=DjangoJSONEncoder, safe=True, **kwargs): |
| 475 | def __init__(self, data, encoder=None, safe=True, **kwargs): |
| 476 | if encoder is None: |
| 477 | from django.core.serializers.json import DjangoJSONEncoder |
| 478 | encoder = DjangoJSONEncoder |
477 | 479 | if safe and not isinstance(data, dict): |
478 | 480 | raise TypeError('In order to allow non-dict objects to be ' |
479 | 481 | 'serialized set the safe parameter to False') |