title: Python JSON module has no attribute 'dumps'
body: <p>I am running Python 2.7 (x64 Linux) and trying to convert a <code>dict</code> to a JSON object.</p>
  
  <pre><code>&gt;&gt;&gt; import sys
  &gt;&gt;&gt; sys.version_info
  sys.version_info(major=2, minor=7, micro=0, releaselevel='final', serial=0)
  </code></pre>
  
  <p>I am trying to use <code>simplejson</code> (falling back to <code>json</code> from the standard library) but I get the following error:</p>
  
  <pre><code>&gt;&gt;&gt; try: import simplejson as json
  ... except ImportError: import json
  ...                  
  &gt;&gt;&gt; metadata = dict()
  &gt;&gt;&gt; metadata['foo'] = 'bar'
  &gt;&gt;&gt; print metadata
  {'foo': 'bar'}
  &gt;&gt;&gt; json.dumps(metadata)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'module' object has no attribute 'dumps' 
  </code></pre>
  
  <p>Is there something obvious I am missing about using <code>json</code> or <code>simplejson</code> with Python 2.7?</p>