djblets.util.serializers¶
-
class
DjbletsJSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding=’utf-8’, default=None)[source]¶ Bases:
django.core.serializers.json.DjangoJSONEncoderA JSON encoder that supports lazy strings, datetimes, and some models.
This is a specialization of
DjangoJSONEncoderthe does the following:- Evaluates strings translated with
ugettext_lazy()orgettext_lazy()to real strings. - Removes the milliseconds and microseconds from
datetimes. - Serializes Django
modelswith ato_jsonmethod via that method.
- Evaluates strings translated with