title: How to use JSONDecoder in Python? Getting only the inner dict to decode
body: <p>I have a JSONEncoder and JSONDecoder:</p>
  
  <pre><code>class SimpleTargetJSONEncoder(json.JSONEncoder):
      """
      converts a SimpleTarget to a Dict so it can be JSONified
      """
  
      def default(self, o):
          if isinstance(o, SimpleTargetItem):
              return {
                  'x': o.x(),
                  'y': o.y(),
                  'status': o.status,
                  'imageSet': o.imageSet}
  
  
  class SimpleTargetJSONDecoder(json.JSONDecoder):
      def __init__(self):
          json.JSONDecoder.__init__(self, object_hook=self.dict_to_object)
  
      def dict_to_object(self, d):
          t = SimpleTargetItem(imageSet=d['imageSet'])
          t.setX(d['x'])
          t.setY(d['y'])
          return t
  </code></pre>
  
  <p>The encoder writes out a file like this:</p>
  
  <pre><code>[
      {
          "y": 2514.0, 
          "x": 2399.0, 
          "status": "default", 
          "imageSet": {
              "default": ":/images/blue-circle.png", 
              "active": ":/images/green-circle.png", 
              "removed": ":/images/black-circle.png", 
          }
      }, 
      {
          "y": 2360.0, 
          "x": 2404.0, 
          "status": "default", 
          "imageSet": {
              "default": ":/images/blue-square.png", 
              "active": ":/images/green-square.png", 
              "removed": ":/images/black-square.png", 
          }
      }
  ]
  </code></pre>
  
  <p>But when I call the decoder, I get:</p>
  
  <pre><code>/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/dmd/Documents/inmotion/py/targetlayoutdesigner/designer.py
  Traceback (most recent call last):
    File "/Users/dmd/Documents/inmotion/py/targetlayoutdesigner/targetlayoutwindow.py", line 131, in loadLayout
      for t in SimpleTargetJSONDecoder().decode(open(fname).read()):
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
      obj, end = self.scan_once(s, idx)
    File "/Users/dmd/Documents/inmotion/py/targetlayoutdesigner/targetitem.py", line 113, in dict_to_object
      t = SimpleTargetItem(imageSet=d['imageSet'])
  KeyError: 'imageSet'
  </code></pre>
  
  <p>And if I look at d at that point, d is just this:</p>
  
  <pre><code>{u'active': u':/images/green-circle.png',
   u'default': u':/images/blue-circle.png',
   u'removed': u':/images/black-circle.png'}
  </code></pre>
  
  <p>i.e., the inner dict.</p>
  
  <p>What am I doing wrong?</p>