#36832: Django DB connection returns incorrect type for JSON objects with a top-
level list
-------------------------------------+-------------------------------------
Reporter: Christophe Pettus | Owner:
| Christophe Pettus
Type: Bug | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
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 Tim Graham):
You're correct that I was mistaken in claiming it's psycopg2-specific,
however,
[https://github.com/django/django/blob/6c2780ffe1aaf526e01287f9d0805143c23c7920/django/db/backends/postgresql/psycopg_any.py#L58-L61
the same design decision] applies for psycopg:
{{{#!python
# Register a no-op dumper to avoid a round trip from psycopg
version 3
# decode to json.dumps() to json.loads(), when using a custom
decoder
# in JSONField.
ctx.register_loader("jsonb", TextLoader)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36832#comment:4>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019b5ce94204-073089bb-1597-452a-8cce-077270385356-000000%40eu-central-1.amazonses.com.