-
-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Description
In JSON there are effectively two types of null.
1) When the key is provided, and the value is explicitly stated as null.
2) When the key is not provided, and the value is implicitly null.
This is important when constructing a PATCH endpoint because:
- When the key is provided, with a null value, the field should be set to null
- When the key is not provided, the value should not be changed
There is a more detailed discussion of this issue here, with example code of how to solve the problem:
https://www.calhoun.io/how-to-determine-if-a-json-key-has-been-set-to-null-or-not-provided/
It would be nice if the null library can support this.
russell-dot-js, Bububuger, glaslos, Fryuni, ldirer and 9 more
Metadata
Metadata
Assignees
Labels
No labels