Remove a member with null
02A null value inside an object patch removes that named member rather than assigning null to it.
Only note remains, with its original null value. A null patch entry for an absent name would add nothing.
Source for this drawing: RFC 7396 · Read RFC section 2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
- Member removal
- The name/value pair is absent from the result, which differs from a present null value.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Object-member null is a deletion instruction.
- For a member in an object patch whose value is null, remove that name/value pair if the target has it. If the name is absent, there is nothing to remove; null does not add a new null member.
- An unmentioned target member whose value is already null is retained. The deletion meaning comes from null in the patch, not from every null anywhere in the target.
- This format is best suited to object-based documents that do not use explicit null values as ordinary fields. An object-member patch cannot directly set that member to null because that spelling means removal.
Example target: {"color":"blue","note":null}. Patch: {"color":null}. Result: {"note":null}. At the root, a patch that is itself null is a different case: it replaces the whole target with null, as explained in the replacement chapter.
Read the RFC section ↗