Importing $numberDouble json with a number that's an integer makes it int32

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.41.0
    • Affects Version/s: 1.40.4
    • Component/s: Import/Export
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • 2
    • Not Needed
    • None

      Example doc to import (json file with this attached):
      ```
      [{
        "doubleNum":

      {     "$numberDouble": "-45"   }

      }]
      ```

      Results in Int32 type:

      Probably needs a `promoteValues: false` in the ejson deserialize: https://github.com/mongodb-js/compass/blob/50b2b2966e1eae0c92a60877f40a5e94624cec14/packages/compass-import-export/src/import/import-json.ts#L81 
      Let's also add a regression test.

        1. doubleNum.json
          0.1 kB
          Rhys Howell
        2. Screenshot 2023-11-08 at 3.00.56 PM.png
          29 kB
          Rhys Howell

            Assignee:
            Le Roux Bodenstein
            Reporter:
            Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: