#25254: Allow control over json.dumps keyword arguments in JsonResponse
-------------------------+-------------------------------------------------
Reporter: jaap3 | Owner: nobody
Type: New | Status: new
feature |
Component: HTTP | Version: master
handling | Keywords: json dumps indent separators
Severity: Normal | jsonresponse
Triage Stage: | Has patch: 0
Unreviewed |
Easy pickings: 0 | UI/UX: 0
-------------------------+-------------------------------------------------
Currently `JsonResponse`'s only allows changing the JSON encoder class. It
would be helpful to allow some/all of the arguments to `json.dumps` .
In my case I've had the need to set `indent=2`, to get a more readable
output, and `separators=(',', ':')` to get the most compact output
possible. Having control over `allow_nan` or `skipkeys` could also be
useful for some.
--
Ticket URL: <https://code.djangoproject.com/ticket/25254>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.2e0406759c3df221875a738dd36f07cd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.