Changes between Initial Version and Version 7 of Ticket #36139


Ignore:
Timestamp:
Feb 4, 2025, 11:08:12 AM (3 weeks ago)
Author:
john-parton
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36139

    • Property Has patch set
    • Property Owner set to john-parton
    • Property Status newclosed
    • Property Resolutionwontfix
  • Ticket #36139 – Description

    initial v7  
    1 In working towards supporting `ABSENT ON NULL` for JSONArray, I did some digging on what it would take to implement it for `JSONObject` as well, and essentially, because the __init__ signature consumes all the `kwargs`, there's not really a good way to configure its behavior without conflicting with a key definition.
     1Currently there is no way to build a JSON object in the database using the JSONObject function where the keys are anything but static keys.
    22
    3 If you could specify the items of a JSONObject positionally, then you get the aforementioned benefit of being able to have kwargs as well without conflicting, but you also get the added benefit of being able to construct objects with non-static keys.
     3This is not a limitation of any of the backends that support JSON objects.
    44
    5 As an example esoteric usage, if you're trying to get the database to omit valid objects for the Elasticsearch DSL, you would almost certainly need to be able to build objects with non-static keys.
     5If you could specify the items of a JSONObject positionally, you get the benefit of being able to construct objects with non-static keys.
     6
     7As an example esoteric usage, if you're trying to get the database to emit valid objects for the Elasticsearch DSL, you would almost certainly need to be able to build objects with non-static keys.
    68
    79For example https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
Back to Top