title: Bottle and Json
body: <p>How do I go about returning json data from a bottle request handler.  I see a dict2json method in the bottle src but I am not sure how to use it.</p>
  
  <p>What is in the documentation:</p>
  
  <pre><code>@route('/spam')
  def spam():
      return {'status':'online', 'servertime':time.time()}
  </code></pre>
  
  <p>Gives me this when I bring up the page:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;&lt;/head&gt;
      &lt;body&gt;statusservertime&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>