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

Long integers serialize as doubles

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-4.2.0
    • Affects Version/s: bson-4.1.0
    • Component/s: BSON
    • None

      https://github.com/mongodb/js-bson/issues/384 

      As described in the issue, the inner logic for determining whether to serialize as Long/Double is never reached because of the outer condition for:

      value >= constants.JS_INT_MIN &&
      value <= constants.JS_INT_MAX

      However, simply removing the outer condition causes these tests to fail.

      It's not immediately clear how we should deserialize Longs which are larger than Number.MAX_SAFE_INTEGER.

       

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            eric.adum@mongodb.com Eric Adum (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: