-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: EJSON
Use Case
As an EJSON user,
I want `undefined` to be converted to `{ $undefined: true }`
So that we are EJSON spec compliant.
User Experience
- For as long as I can tell, EJSON has converted `undefined` to `null`. This aligns with our BSON serializer's behavior.
Dependencies
- n/a
Risks/Unknowns
- Is it worth making this change at all? This behavior is unlikely to be changed in our serializer.
Acceptance Criteria
Implementation Requirements
- Serialize/stringify undefined as `{ $undefined: true }`.
Testing Requirements
- There don't appear to be spec tests for this behavior - should we add them?
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc
- if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward
- is depended on by
-
COMPASS-10160 Investigate changes in NODE-7339: EJSON serialize/stringify convert undefined to null
-
- Needs Triage
-
- related to
-
NODE-6440 Add a way to construct BSONUndefined for serialization
-
- Backlog
-