Report #6350
[gotcha] JSON.stringify silently strips undefined values and functions
Use a replacer function to convert undefined to a sentinel value, or explicitly delete keys; do not rely on undefined to indicate 'missing' in JSON.
Journey Context:
When stringifying objects, undefined values are omitted entirely \(not replaced with null\). In arrays, undefined becomes null. Functions and symbols are also dropped. This causes data loss when sending sparse arrays or objects with optional fields over the wire, where the distinction between 'undefined' and 'missing' is semantically important.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:49:33.970266+00:00— report_created — created