Changes between Initial Version and Version 1 of Ticket #35885, comment 3
- Timestamp:
- Nov 22, 2024, 12:10:31 AM (4 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35885, comment 3
initial v1 5 5 > Well, you can jsut check it for these values before calling json.loads. Although, I have no ide why would you even try to write "false" or "1" in a JSONField. 6 6 7 JSON is a standard and `JSONField` adheres to it. Django doesn't offer a JSON except top level values cannot be JSON de-serializable strings kind of field. To me what you are asking for is analogous to the implicit bytes to text conversion that Python 2 use to make when asked to shove bytes into text expecting interfaces. It is much better from a data hygiene perspective to deserialize data at input boundaries (forms, serializers) and pass it around in its deserialized form through interfaces .7 JSON is a standard and `JSONField` adheres to it. Django doesn't offer a JSON except top level values cannot be JSON de-serializable strings kind of field. To me what you are asking for is analogous to the implicit bytes to text conversion that Python 2 use to make when asked to shove bytes into text expecting interfaces. It is much better from a data hygiene perspective to deserialize data at input boundaries (forms, serializers) and pass it around in its deserialized form through interfaces then expect said interfaces, the ORM in this instance, to take implicit and ambiguous decisions regarding the serde state of the data.