#31973: TypeError loading data in JSONField if DB has native JSON support
-------------------------------------+-------------------------------------
Reporter: Adam Alton | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 3.1
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by felixxm):
> I’m not using any custom JSONField stuff, only the built-ins. It does
appear that because only the json.JSONDecodeError is being caught as an
exception, its missing the case where—because of the DBs built-in JSON
support—the data has already been converted.
The data shouldn't be converted because Django uses a
[https://github.com/django/django/blob/5ea1621c724e765c9a642a1b3b6e83419fda920b/django/db/backends/postgresql/base.py#L203-L206
custom stub converter]. Please provide a sample project that reproduces
this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/31973#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.26817ced2967671b2901236d307550fa%40djangoproject.com.