Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4335

negative 0 should serialize to Double

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-5.0.0
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:
    • 3
    • Not Needed
    • Not Needed

      Use Case

      As a BSON library user, 
      I want -0 to serialize to the Double type
      So that it remains negative when round-trips from BSON. 

      User Impact

      *How severe is the impact? Is anyone blocked or broken?

      Users who use -0 are not able to preserve the negative.

      Dependencies

      • JS-BSON, BSON-EXT

      Unknowns

      • Is it a breaking change to start serializing -0 differently?
      • How does BSON-EXT serialize -0?

      Acceptance Criteria

      • TBD, based on unknowns

      Implementation Requirements

      • to have bson.serialize(-0) to Double (BSON type 0x01)

      Testing Requirements

      • see js-bson/test/node/double_tests.js for skipped test __ 

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            aditi.khare@mongodb.com Aditi Khare
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: