Changes between Version 2 and Version 3 of Ticket #35071, comment 12
- Timestamp:
- Jan 1, 2024, 1:55:31 PM (11 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35071, comment 12
v2 v3 14 14 }}} 15 15 16 We also can't make `encoder` default to `DjangoJSONEncoder` as it elides the original type so you'd be able to serialize uuid, datetimes, etc but not get them back which breaks the principle of least astonishment IMO. 16 We also can't make `encoder` default to `DjangoJSONEncoder` as it elides the original type so you'd be able to serialize uuid, datetimes, etc but not get them back which breaks the principle of least astonishment IMO. `DjangoJSONEncoder` works well for the serialization framework as it is equipped which a schema (model definition) so type information can be restored but `JSONField` are schema less so it's not a good ''default''.