#36832: Django DB connection returns incorrect type for JSON objects with a top-
level list
-------------------------------------+-------------------------------------
     Reporter:  Christophe Pettus    |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  6.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * resolution:   => invalid
 * status:  new => closed

Comment:

 It's an intentional behavior introduced in
 0be51d2226fce030ac9ca840535a524f41e9832c (#31956). The relevant code:
 {{{#!python
         # Register dummy loads() to avoid a round trip from psycopg2's
 decode
         # to json.dumps() to json.loads(), when using a custom decoder in
         # JSONField.
         psycopg2.extras.register_default_jsonb(conn_or_curs=connection,
 loads=lambda x: x)
 }}}
 If you have an alternate proposal to address that issue and avoid this
 one, please reopen the ticket, however, I'm not sure there's much value in
 addressing psycopg2-specific issues at this point.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36832#comment:1>
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/0107019b5cc24694-c6a1b7ca-48cf-4f48-9195-e7b4066f0cc1-000000%40eu-central-1.amazonses.com.

Reply via email to