| 1 | From Simon Charette in comment:3, in reference to the issues between SQL's `NULLL` and JSON's `null`: |
| 2 | |
| 3 | In order to finally solve this null ambiguity problem we should: |
| 4 | |
| 5 | 1. 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. |
| 6 | 2. 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 | |
| 8 | The 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 | |