#36139: Allow expressing JSONObject keys dynamically, as well as explicit pair-
values
-------------------------------------+-------------------------------------
     Reporter:  john-parton          |                    Owner:  john-
                                     |  parton
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by john-parton):

 Coming back to this briefly.

 The discussion was not particularly productive, but a specific use case of
 generating bits of Elasticsearch documents or queries was mentioned:
 https://forum.djangoproject.com/t/ability-to-specify-keys-for-jsonobject-
 using-arbitrary-expressions/38559/4

 The elasticsearch query language is a subset of JSON where the specific
 field is represented as a key in a json object. Documentation:
 https://www.elastic.co/docs/explore-analyze/query-
 filter/languages/querydsl#query-filter-context-ex

 If you have an EAV table and want to directly generate JSON documents
 where the keys correspond to the entities in your table, you cannot do
 that with the current JSONObject implementation. I give some reasoning
 here: https://forum.djangoproject.com/t/ability-to-specify-keys-for-
 jsonobject-using-arbitrary-expressions/38559/3

 (I personally don't like EAV tables and would suggest storing extended
 attribute directly as json documents on rows, but you might have a legacy
 table design that prevents you from doing that.)

 We can keep this wontfix, just wanted to come back and summarize, although
 I am interested in SImon's opinion. (Not sure how to summon him. A
 particular favorite food perhaps?)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36139#comment:9>
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/0107019728c3e122-64e6ec43-0241-480e-8291-46a5a1731dfc-000000%40eu-central-1.amazonses.com.

Reply via email to