vadimtsushko/bson — pull request #15 by sestegra (2014-09-05 14:46:24+00:00)
Title: Add BSON_DATA_UNDEFINED type (as clone of BSON_DATA_NULL)

On MongoDB shell, "undefined" value can be inserted on document.
If you do so, mongo_dart driver won't be able to retrieve the document.

First of all, Dart and JSON don't support "undefined" value and they only use "null".
It seems that MongoDB considers "undefined" value as "null" value.

See following commands on MongoDB shell as confirmation.

```
> a = { "x": "3"}
{ "x" : "3" }
> a.y = a.z
> a
{ "x" : "3", "y" : undefined }
> db.foo.insert(a)
WriteResult({ "nInserted" : 1 })
> db.foo.find()
{ "_id" : ObjectId("5409ca2659de2af23b089900"), "x" : "3", "y" : null }
> db.foo.find({"y": null})
{ "_id" : ObjectId("5409ca2659de2af23b089900"), "x" : "3", "y" : null }
> db.foo.find({"y": {"$type":6}})
{ "_id" : ObjectId("5409ca2659de2af23b089900"), "x" : "3", "y" : null }
> db.foo.find({"y": {"$type":10}})
>
```