title: How to load a JSON file in python 2.7
body: <p>I am not able to load the following 'data.json' file in python 2.7.11,</p>
  
  <p>file data.json</p>
  
  <pre><code>{
    "name":xyz,
    "age":12
  }
  </code></pre>
  
  <p>The code i am using the load the above file,</p>
  
  <pre><code>import json
  json_data = open ('data.json').read ()
  json.loads(json_data)
  </code></pre>
  
  <p>I always get the following error</p>
  
  <blockquote>
    <p>ValueError: No JSON object could be decoded</p>
  </blockquote>
  
  <p>In the meantime,i also tried using yaml.load and it worked fine. But i wanted to know what is that i am doing wrong.</p>