title: Python JSON encoding
body: <p>I'm trying to encode data to JSON in Python and I been having a quite a bit of trouble. I believe the problem is simply a misunderstanding. </p>
  
  <p>I'm relatively new to Python and never really got familiar with the various Python data types, so that's most likely what's messing me up. </p>
  
  <p>Currently I am declaring a list, looping through and another list, and appending one list within another:</p>
  
  <pre><code>import simplejson, json
  data = [['apple', 'cat'], ['banana', 'dog'], ['pear', 'fish']]
  
  x = simplejson.loads(data)
  # &gt;&gt;&gt; typeError: expected string or buffer..
  
  x = simplejson.dumps(stream)
  # &gt;&gt;&gt; [["apple", "cat"], ["banana", "dog"], ["pear", "fish"]]
  # - shouldn't JSON encoded strings be like: {{"apple":{"cat"},{"banana":"dog"}}
  </code></pre>
  
  <p>So I either: </p>
  
  <ul>
  <li>I don't understand JSON Syntax</li>
  <li>I don't understand the Pythons JSON module(s)</li>
  <li>I'm using an inappropriate data type.</li>
  </ul>