#33779: Add an encoder parameter to django.utils.html.json_script
----------------------------------------+------------------------
               Reporter:  Claude Paroz  |          Owner:  nobody
                   Type:  New feature   |         Status:  new
              Component:  Utilities     |        Version:  dev
               Severity:  Normal        |       Keywords:
           Triage Stage:  Unreviewed    |      Has patch:  0
    Needs documentation:  0             |    Needs tests:  0
Patch needs improvement:  0             |  Easy pickings:  0
                  UI/UX:  0             |
----------------------------------------+------------------------
 I have a use case where I want to customize the JSON encoding of some
 values to output to the template layer. It looks like
 `django.utils.html.json_script` is a good utility for that, however the
 JSON encoder is hardcoded to `DjangoJSONEncoder`. I think it would be nice
 to be able to pass a custom encoder class.

 By the way, `django.utils.html.json_script` is not documented (only its
 template filter counterpart is), would it be a good thing to add to the
 docs?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33779>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701815be182a3-4dbdb5d3-f368-49e8-8182-2f20b064087b-000000%40eu-central-1.amazonses.com.

Reply via email to