kevinmickey / django-prettyjson

Enables pretty JSON viewer in Django forms, admin, or templates
BSD 3-Clause "New" or "Revised" License
139 stars 21 forks source link

DjangoJSONEncoder instead of standardjson? #20

Open minusf opened 6 years ago

minusf commented 6 years ago

would it not be possible to use DjangoJSONEncoder instead of standardjson?

class DjangoJSONEncoder(json.JSONEncoder):
    """
    JSONEncoder subclass that knows how to encode date/time, decimal types, and
    UUIDs.
    """
kevinmickey commented 6 years ago

Thanks for the suggestion -- I was recommended standardjson years ago, but I would definitely prefer having one less dependency, so I'll take a look.

See https://github.com/audreyr/standardjson/issues/3