Class JsonResponse

An HTTP response class that consumes data to be serialized to JSON.

Declaration

class JsonResponse(HttpResponse)
source link

Documentation

:param data: Data to be dumped into json. By default only ``dict`` objects
  are allowed to be passed due to a security flaw before EcmaScript 5. See
  the ``safe`` parameter for more information.
:param encoder: Should be a json encoder class. Defaults to
  ``django.core.serializers.json.DjangoJSONEncoder``.
:param safe: Controls if only ``dict`` objects may be serialized. Defaults
  to ``True``.
:param json_dumps_params: A dictionary of kwargs passed to json.dumps().

Methods

Inherited methods

Reexports