[SERVER-1631] bsondump doesn't escape strings correctly Created: 13/Aug/10  Updated: 12/Jul/16  Resolved: 14/Aug/10

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 1.6.0
Fix Version/s: 1.7.0

Type: Bug Priority: Minor - P4
Reporter: J Greely Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MacOS X 10.6.4, 64-bit


Operating System: ALL
Participants:

 Description   

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



 Comments   
Comment by auto [ 14/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: use json for bsondump SERVER-1631
http://github.com/mongodb/mongo/commit/f78f97061b8f7e7bf1e182d04905fb9c636f90e2

Generated at Thu Feb 08 02:57:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.