EJSON serialize/stringify convert undefined to null

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: EJSON
    • Needed
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Unassigned
            Reporter:
            Bailey Pearson
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: