Changes between Initial Version and Version 14 of Ticket #35381


Ignore:
Timestamp:
Jun 24, 2025, 10:20:00 AM (3 months ago)
Author:
Natalia Bidart
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35381

    • Property Cc David Sanders Simon Charette Mariusz Felisiak David Wobrock Sage Abdullah Clifford Gama Adam Johnson added
    • Property Triage Stage UnreviewedAccepted
    • Property Type UncategorizedNew feature
    • Property Owner nobody removed
    • Property Summary Regression on json null value constraints in django 4.2Provide `JSONNull` expression to represent JSON `null` value
    • Property Version 5.0dev
  • Ticket #35381 – Description

    initial v14  
     1From Simon Charette in comment:3, in reference to the issues between SQL's `NULLL` and JSON's `null`:
     2
     3In order to finally solve this null ambiguity problem we should:
     4
     51. Introduce a `JSONNull` expression to disambiguate between the two. It would also allow the creation of model instances with a JSON `null` which is convoluted today as it requires `models.Value(None, models.JSONField())` to be used.
     62. Deprecate `filter(jsonfield=None)` meaning JSON `null` by requiring `JSONNull` to be used instead. Should we only do this at the top level to still allow `jsonfield__key=None` to filter against null keys? An alternative would be to introduce a `__jsonnull` lookup.
     7
     8The good news is that Django makes it very hard to store JSON `null` in the first place since #34754 so this kind of constraints should be rarely needed.
     9
     10== Old description ==
     11
    112Regression is still present in 5.0 and main branch
    213
Back to Top