bsondump doesn't escape strings correctly

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.7.0
    • Affects Version/s: 1.6.0
    • Component/s: Tools
    • None
    • Environment:
      MacOS X 10.6.4, 64-bit
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This affects double-quotes, literal carriage returns and newlines, etc.

      % mongo
      MongoDB shell version: 1.6.0
      connecting to: test
      > db.foo.insert(

      {x:"foo \"foo\" foo"}

      )
      > db.foo.find()

      { "_id" : ObjectId("4c659a8dfe7acb2308816965"), "x" : "foo \"foo\" foo" }

      % mongodump -d test -c foo
      connected to: 127.0.0.1
      DATABASE: test to dump/test
      test.foo to dump/test/foo.bson
      1 objects

      % bsondump dump/test/foo.bson
      connected to: 127.0.0.1

      { _id: ObjectId('4c659a8dfe7acb2308816965'), x: "foo "foo" foo" }

      Fri Aug 13 12:19:04 1 objects found

              Assignee:
              Eliot Horowitz (Inactive)
              Reporter:
              J Greely
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: