Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1888

Cannot Represent double(0) when representing document

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Environment:
      mongosh 1.8 and also 2.0
    • Developer Tools

      db.test.insert({x: 0.0}) results in `x: <int>0`

      and I have no idea how to repr it as a double value.

       

      In C# driver, number types cannot be auto-converted when deserializing Bson Doc, so mongosh will result in driver type error, when I want to read a `double x`

            Assignee:
            Unassigned Unassigned
            Reporter:
            740310894@qq.com cy N/A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: