title: Is there a way to represent ISODate and ObjectID fields in JSON that MongoDB will recognize?
body: <p>I am trying to import a JSON file into MongoDB inside node.  Here is what I am trying to do:</p>
  
  <pre><code>db.open(function(err, db) {
    if(!err) {
      db.collection('orgs', {safe: true}, function(err, collection) {
        if (err) {
          console.log("The 'orgs' collection doesn't exist. Creating it with sample data...");
          db.collection('orgs', function(err, collection) {
            orgs = require("../data/orgs.json");
            collection.insert(orgs, {safe:true}, function(err, result) {});
          });
        }
      });
    }
  });
  </code></pre>
  
  <p>Note that NodeJS can import JSON automatically as JSON, which is nice, but JSON does not handle objects like ISODate or ObjectID.  Here is a snippit of the JSON data I am trying to import:</p>
  
  <p>./data/orgs.json:</p>
  
  <pre><code>  {
      "stub": "apple",
      "name":"Apple, Inc.",
      "timezone": "America/New_York",
      "currency": "USD",
      "plans": [
        {"planId":1, "dtStart": {"$date":"2012-12-07 12:34:56"}},
        {"planId":0, "dtStart": {"$date":"2012-12-05 23:45:02"}, "dtEnd": {"$date":"2012-12-07 12:34:56"}}
      ]
    }
  </code></pre>
  
  <p>I am using the mongodb native driver for Node.</p>
  
  <p>I tried to use integer representation of the date, but it did not work.</p>
  
  <p>Is there a way to represent ISODate and ObjectID fields in JSON that MongoDB will recognize?</p>