title: How to call json.decode()?
body: <p>The code I am working on is a function that converts a JSON object into iCalendar form.  To do this, I am writing an iCalendar template, and then inserting the info from the JSON into that.  My code requires JSON's decode which has caused me a lot of setbacks lately.  Here is what I have tried and the error messages I am getting.</p>
  
  <pre><code>import json
  def convert(jsonData)
      ....
      data = json.decode(jsonData)
  </code></pre>
  
  <p>AttributeError: 'module' object has no attribute 'decode'</p>
  
  <p>This error confuses me because the method is in the JSON API <a href="https://docs.python.org/2/library/json.html#module-json" rel="nofollow">https://docs.python.org/2/library/json.html#module-json</a></p>
  
  <pre><code>import json
  def convert(jsonData)
      ....
      data = json.JSONDecoder().decode(jsonData)
  </code></pre>
  
  <p>TypeError: expected string or buffer </p>
  
  <p>The second error references a line of code in decode():
  line 366</p>
  
  <pre><code>end = self.raw_decode(s,idx=_w(s,o).end())
  </code></pre>
  
  <p><strong>EDIT</strong>:</p>
  
  <pre><code>data = json.JSONDecoder.decode(jsonData)
  </code></pre>
  
  <p>TypeError: unbound method decode() must be called with JSONDecoder instance as first argument (got dict instance instead)</p>