Opened 4 years ago

Closed 4 years ago

#32474 closed Cleanup/optimization (duplicate)

JSONField and register_default_jsonb all json column return as str

Reported by: Петр Eлагин Owned by: nobody
Component: Database layer (models, ORM) Version: 3.1
Severity: Normal Keywords: jsonb
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

when i make select all json field as string

# 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)

/Users/koshak01/Virtualenvs/virtual3.9/lib/python3.9/site-packages/django/db/backends/postgresql/base.py:206

i make raw select request w/o ORM

Change History (1)

comment:1 by Mariusz Felisiak, 4 years ago

Component: contrib.postgresDatabase layer (models, ORM)
Owner: set to nobody
Resolution: duplicate
Status: newclosed

Duplicate of #31991.

Note: See TracTickets for help on using tickets.
Back to Top