#27675: Django postgres JSONField encoding
-------------------------------------+-------------------------------------
Reporter: Hisham Waleed Karam | Owner: nobody
Type: Bug | Status: closed
Component: contrib.postgres | Version: 1.10
Severity: Normal | Resolution: needsinfo
Keywords: models JSONField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by grapemix):
I got the same problem too. I am very sure the bug is not caused by data
corruption. I double check with the db table type and the raw data in
postgres db. The interesting thing is the data return dict type in django-
admin.py shell environment, but the data will return string in the
runserver and testcase environment.
Another experiment I did is that converting the string data to dict by
json.loads() and save to db in the runserver environment. The data type of
the JSONField is dict, but if I fetch the model again, the data type of
the JSONField become string.
So please reopen the ticket. This bug gives us lots of trouble.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/27675#comment:6>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.9ef773ecd8c8df942b6dcd8b29596c59%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.