class JsonResponse(data, encoder=DjangoJSONEncoder, safe=True, json_dumps_params=None, **kwargs) [source]
An HttpResponse subclass that helps to create a JSON-encoded response. It inherits most behavior from its superclass with a couple differences:
Its default Content-Type header is set to application/json.
The first parameter, data, should be a dict instance. If the safe parameter is set to False (see below) it can be any JSON-serializable object.
The encoder, which defaults to django.core