File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ for easier customization. By default it handles some extra data types:
242242
243243- :class: `datetime.datetime ` and :class: `datetime.date ` are serialized
244244 to :rfc: `822 ` strings. This is the same as the HTTP date format.
245+ - :class: `decimal.Decimal ` is serialized to a string.
245246- :class: `uuid.UUID ` is serialized to a string.
246247- :class: `dataclasses.dataclass ` is passed to
247248 :func: `dataclasses.asdict `.
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class JSONEncoder(_json.JSONEncoder):
2323 - :class:`datetime.datetime` and :class:`datetime.date` are
2424 serialized to :rfc:`822` strings. This is the same as the HTTP
2525 date format.
26+ - :class:`decimal.Decimal` is serialized to a string.
2627 - :class:`uuid.UUID` is serialized to a string.
2728 - :class:`dataclasses.dataclass` is passed to
2829 :func:`dataclasses.asdict`.
You can’t perform that action at this time.
0 commit comments