JSON / presence / handoff

Separate “missing” from empty JSON values

Review missing fields, null, empty strings, arrays and objects as different presence states. Use synthetic cases only; no user JSON is accepted.

Presence is not one empty state

Whether a field is absent, explicitly null, or a typed empty value changes defaults, updates and required checks.

missing ≠ null ≠ "" ≠ [] ≠ {}
caseWhat to review
missing-fieldThe field does not exist; a default may apply.
null-valueThe field exists and explicitly carries null.
empty-stringA string exists and has zero length.
empty-arrayAn array exists with zero elements.
empty-objectAn object exists with zero keys.
explicit-valueA value exists and is part of the handoff.

Review order

  1. Check whether the field exists.
  2. If it exists, distinguish null from a typed empty value.
  3. Record the receiver’s default and required rules separately.
  4. Do not guess about an ambiguous input; hand it back for review.

This page uses synthetic fixtures only. There is no upload, external request, storage, or user JSON parsing.