#35642: After Upgrading from Django 2.2.28 to Django 3.2.25, JSONField is 
returning
data in string rather than dictionary/list
-------------------------------------+-------------------------------------
     Reporter:  Bittu Ray            |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.postgres     |                  Version:  3.2
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  jsonfield, django    |             Triage Stage:
  3.2                                |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Bittu Ray):

 Replying to [comment:2 Simon Charette]:
 > > when I am creating the object input as str or json.dumps, the output
 is also coming in string format rather than python dictionary or list
 format
 >
 > That's the crux of your issue; don't do that. JSON supports storing
 strings as top level members so if you want objects to be stored pass
 `dict` and not their JSON serialized form.

 Hi, Even when I give input as dict, it's stored as a string instead of an
 object in Postgres database. in django 2.2.28, it was getting stored as an
 object. So even if I use dict, the data will still be stored as a string
 in the Postgres.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35642#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701910dac959e-45aad20d-3c40-47af-b193-78f67b4ea29a-000000%40eu-central-1.amazonses.com.

Reply via email to