title: How to overcome "datetime.datetime not JSON serializable"?
body: <p>I have a basic dict as follows:</p>
  
  <pre class="lang-py prettyprint-override"><code>sample = {}
  sample['title'] = "String"
  sample['somedate'] = somedatetimehere
  </code></pre>
  
  <p>When I try to do <code>jsonify(sample)</code> I get:</p>
  
  <pre><code>TypeError: datetime.datetime(2012, 8, 8, 21, 46, 24, 862000) is not JSON serializable
  </code></pre>
  
  <p>What can I do such that my dictionary sample can overcome the error above?</p>
  
  <p><strong>Note:</strong> Though it may not be relevant, the dictionaries are generated from the retrieval of records out of <code>mongodb</code> where when I print out <code>str(sample['somedate'])</code>, the output is <code>2012-08-08 21:46:24.862000</code>.</p>