Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-178

Ensure fully guaranteed roundtrip of data through mongoexport/mongoimport via JSON

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.3
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: mongoexport, mongoimport
    • None
    • Iteration 0, Iteration 3.1.0, Kernel Tools Iteration 3.1.1, Kernel Tools Iteration 3.1.2, Kernel Tools Iteration 3

      it's kind of bad that you cannot do mongoexport / mongoimport and get things identical

      foo:PRIMARY> db.accounts.insert(

      {a: Timestamp()}

      )
      foo:PRIMARY> db.accounts.find()
      { "_id" : ObjectId("4d825eeef7e844daacb16e96"), "a" :

      { "t" : 1300389614000, "i" : 1 }

      }
      here I'm assuming the timestamp has type "timestamp" in the bson.

      $ ./mongoexport -d testdb -c accounts | ./mongoimport -d testdb -c accounts2

      foo:PRIMARY> db.accounts2.find()
      { "_id" : ObjectId("4d825eeef7e844daacb16e96"), "a" :

      { "t" : NumberLong("1300389614000"), "i" : 1 }

      }
      here I'm assuming the timestamp is just an object in the bson..

      For all native bson types, we should make sure they can be exported/imported in JSON reliably.
      It seems issue exists with at least: timestamp, date, code, ..

            Assignee:
            shraya.ramani Shraya Ramani
            Reporter:
            antoine Antoine Girbal
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: