#36462: Should we include documentation for has_any_keys for the JSONField if 
the
value is an array.
-------------------------------------+-------------------------------------
     Reporter:  Willem Van Onsem     |                     Type:  New
                                     |  feature
       Status:  new                  |                Component:
                                     |  Documentation
      Version:  5.1                  |                 Severity:  Normal
     Keywords:  orm, documentation,  |             Triage Stage:
  JSON, postgreSQL.                  |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 Recently, there was a question on
 [https://stackoverflow.com/a/79662455/67579 StackOverflow] about how to
 query a JSON field that has an array, to look if the array contains at
 least one of the items.

 A bit surprising, but the `?|` operator does that, indeed
 [https://www.postgresql.org/docs/9.5/functions-json.html according to the
 docs], this use-case is not (well) documented in Django, and `keys`
 evidently suggests that it is for dictionaries.

 I'm wondering if we should include such cases in the documentation, so add
 an example where the JSON blob is an array of strings for example, and
 demonstrate how it is filtered.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36462>
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/0107019763daab9e-69f61ec0-87d8-4346-94c4-e5b509277c8f-000000%40eu-central-1.amazonses.com.

Reply via email to