title: Decoding JSON file from Twitter in Python using simplejson
body: <p>A small part of my JSON file looks like the following. It passed  a JSON validator. (I added cl</p>
  
  <pre><code>{
  "next_page": "?page=2&amp;max_id=210389654296469504&amp;q=cocaine&amp;geocode=40.665572%2C-73.923557%2C10mi&amp;rpp=100",
  "completed_in": 0.289,
  "max_id_str": "210389654296469504",
  "since_id_str": "0",
  "refresh_url": "?since_id=210389654296469504&amp;q=cocaine&amp;geocode=40.665572%2C-73.923557%2C10mi",
  "results": [
      {
          "iso_language_code": "en",
          "to_user_id": 486935435,
          "to_user_id_str": "486935435",
          "profile_image_url_https": "https://si0.twimg.com/profile_images/1561856049/Zak_W_Photo_normal.jpg",
          "from_user_id_str": "82389940",
          "text": "@Bill__Murray cocaine &amp;gt; productivity! Last night I solved the euro crisis and designed a new cat. If I could only find that napkin.",
          "from_user_name": "Zak Williams",
          "in_reply_to_status_id_str": "210319741322133504",
          "profile_image_url": "http://a0.twimg.com/profile_images/1561856049/Zak_W_Photo_normal.jpg",
          "id": 210389654296469500,
          "to_user": "Bill__Murray",
          "source": "&amp;lt;a href=&amp;quot;http://twitter.com/#!/download/iphone&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Twitter for iPhone&amp;lt;/a&amp;gt;",
          "in_reply_to_status_id": 210319741322133500,
          "to_user_name": "Bill Murray",
          "location": "Brooklyn",
          "from_user": "zakwilliams",
          "from_user_id": 82389940,
          "metadata": {
              "result_type": "recent"
          },
          "geo": "null",
          "created_at": "Wed, 06 Jun 2012 15:16:17 +0000",
          "id_str": "210389654296469504"
      }
  ]
  }
  </code></pre>
  
  <p>When I try to load this in Python by typing the following code I get the following error.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code> import simplejson as json
   testname = 'test.txt'
   record = json.loads(testname)
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code> raise JSONDecodeError("No JSON object could be decoded", s, idx)
   simplejson.decoder.JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
  </code></pre>
  
  <p>What am I doing wrong? In fact, I generated the file by using <code>simplejson.dump</code></p>