#25995: Support serialization to `django.contrib.postgres.fields.jsonb.py`
----------------------------------+--------------------------------------
     Reporter:  jimgraham         |                    Owner:  nobody
         Type:  New feature       |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.9
     Severity:  Normal            |               Resolution:
     Keywords:  JSONB             |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Changes (by timgraham):

 * cc: mjtamlyn (added)
 * needs_better_patch:   => 0
 * component:  Database layer (models, ORM) => contrib.postgres
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I think the problem here is that we couldn't also deserialize that data
 since we have no way to know if the user originally passed a string or
 some other Python type. For example, if we see '1' in the JSONField, do we
 deserialize it to 1 (integer) or leave it as a string? Using
 `DjangoJSONEncoder` for model serialization is different because we have
 the model field type hint to use for deserialization.

--
Ticket URL: <https://code.djangoproject.com/ticket/25995#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 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/067.9fba407307ec812459a921b629c70dbe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to