For most types, the shell prints values in extended JSON shell mode, which is why we have the shell mode flavor of eJSON in the first place (shell can parse the output again).
However, for MinKey and MaxKey (at least), this is not the case, and the shell instead prints out the strict syntax.
MongoDB shell version: 3.1.3 connecting to: test Server has startup warnings: 2015-06-27T16:39:10.891+1000 I CONTROL [initandlisten] 2015-06-27T16:39:10.891+1000 I CONTROL [initandlisten] ** NOTE: This is a development version (3.1.3) of MongoDB. 2015-06-27T16:39:10.892+1000 I CONTROL [initandlisten] ** Not recommended for production. 2015-06-27T16:39:10.892+1000 I CONTROL [initandlisten] > Timestamp(3, 5) Timestamp(3, 5) > DBRef("foo", "bar") DBRef("foo", "bar") > MinKey { "$minKey" : 1 } > MaxKey { "$maxKey" : 1 }
I'd expect the shell to print out MinKey and MaxKey instead.
- is duplicated by
-
SERVER-44717 MinKey > MaxKey in agg language
- Closed
- is related to
-
SERVER-6102 Shell displays both 'undefined' and 'null' type as 'null'
- Closed
-
SERVER-19747 MinKey/MaxKey not printing as JSON in MozJS
- Closed
-
SERVER-32862 sh.addShardToZone() allows unusual (invalid?) chunks to be created
- Closed
-
SERVER-8060 MinKey/MaxKey print incorrect V8
- Closed
-
SERVER-24562 Enhance shell to output strict json
- Closed
-
SERVER-34644 Disable `DollarPrefixedFieldName` checks for moveChunk/mergeChunks
- Closed
-
SERVER-13209 Ensure extended shell JSON ouput format round trips through the shell
- Closed