! e.eoo () in a MongoDB request

Something is wrong with this request, and I can’t say what it is. I am sure this is very simple:

db.foo.insert({
    'created at': new Date(),
    ooc: false,
    body: '<p>Moo</p>\n',
    keywords: [ 'Moo' ],
    mentioned: [],
    tags: [],
    sender: {
        _id: 'stuff',
        name: 'lambdadusk',
        'display name': 'Lambda'
    }
});

The error I get from Mongo is simply

!e.eoo()

I am using MongoDB 2.0.5. A mistake in googling didn’t tell me very much.

+5
source share
2 answers

I should have tried this before.

The problem is not the query, but the BSON collection data file was somehow corrupted. I had to give up the collection and then try again.

Fortunately, the collection was empty since I was in the early stages of development.

+2
source

eoo end-of-object, , JSON. , Mongo JSON, , , Date().

http://jsonlint.com/ , , , , . , , Mongo BSON, .

{
    "created at": {},
    "ooc": false,
    "body": "<p>Moo</p>\n",
    "keywords": [
        "Moo"
    ],
    "mentioned": [],
    "tags": [],
    "sender": {
        "_id": "stuff",
        "name": "lambdadusk",
        "displayname": "Lambda"
    }
}
0

All Articles