Problem Statement/Rationale
I noticed that strings are inconsistently quoted in shell output. Double quotes are used for arguments to BSON classes (e.g. ObjectId, ISODate), while single quotes are used elsewhere.
For example:
test> db.foo.find() [ { _id: '6462e1acce3d12b9e229d5fd', title: 'Agent Zero', releaseDate: ISODate("1995-11-16T00:00:00.000Z"), tags: [ 'action', 'thriller' ] }, { _id: ObjectId("6462e1acce3d12b9e229d5fd"), title: 'Agent Zero', year: 1995 } ]
I noticed the above in mongosh-1.8.0, but it probably exists in earlier versions. This may also be a relic of the original mongo shell.
- is related to
-
MONGOSH-1369 Expose and test static fromX bson type creation methods to Binary and ObjectId
- Closed