Mongoexport should preserve int/double type of 0

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • v3.0

      Mongoexport exports a zero-valued integer as a zero-valued double.
      This means that running through a mongoexport/import cycle changes the type for the field, potentially leading to casting exceptions downstream.

      //given: 
      db.foo.insert({_id:0, double:0.0})
      
      //mongoexport yields:
      {"_id":0.0,"double":0.0}
      
      //should yield:
      {"_id":0  ,"double":0.0}
      

              Assignee:
              Gabriel Russell (Inactive)
              Reporter:
              Achille Brighton (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: