Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
None
-
ALL
Description
The extended json spec is here: http://www.mongodb.org/display/DOCS/Mongo+Extended+JSON
Also, this comes up with json parsing and export with mongoimport/export.
The shell will not correctly parse the document/json representation either, but does allow $MaxKey/$MinKey (along with $ref,$id,$db) through on validation incorrectly.
//V8 v2.3.2--pre
|
> MaxKey
|
{ "$MaxKey" : true } // wrong |
> db.max.find()
|
{ "_id" : { "$MinKey" : true } } |
{ "_id" : { "$MaxKey" : true } } |
> db.max.find({_id:{$type:-1}})
|
{ "_id" : { "$MinKey" : true } } |
> db.max.find({_id:{$type:0x7f}})
|
{ "_id" : { "$MaxKey" : true } } |
> tojson(MaxKey)
|
{ "$maxKey" : 1 } |
> db.max.insert({_id:{$MaxKey:true}}) |
> db.max.count()
|
3
|
|
|
//SM 2.2.2
|
> MaxKey
|
{ "$maxKey" : 1 } |
> db.max.find()
|
{ "_id" : { $minKey : 1 } } |
{ "_id" : { $maxKey : 1 } } |
> db.max.find({_id:{$type:-1}})
|
{ "_id" : { $minKey : 1 } } |
> db.max.find({_id:{$type:0x7f}})
|
{ "_id" : { $maxKey : 1 } } |
> tojson(MaxKey)
|
{ "$maxKey" : 1 } |
> db.max.insert({_id:{$MaxKey:true}}) |
> db.max.count()
|
3
|
Attachments
Issue Links
- is related to
-
SERVER-8052 json parser should support all types including $minKey/maxKey
-
- Closed
-
- related to
-
SERVER-19171 Shell does not always use extended JSON Shell Syntax
-
- Closed
-