title: How to read JSON file with comments?
body: <p>The comment are causing errors. I have a <code>contents.json</code> file which looks like:</p>
  <pre><code>{
  &quot;Fridge&quot;: [
      [&quot;apples&quot;],
      [&quot;chips&quot;,&quot;cake&quot;,&quot;10&quot;]    // This comment here is causing error
  ],
  &quot;car&quot;: [
      [&quot;engine&quot;,&quot;tires&quot;,&quot;fuel&quot;],
      ]
  }
  </code></pre>
  <p>My python script is like this</p>
  <pre><code>import json
  jsonfile = open('contents.json','r')
  jsondata = jsonfile.read()
      
  objec = json.loads(jsondata)
  
  list_o = objec['Fridge']
  
  for i in (list_o):
      print(i)
  </code></pre>
  <p>In my <code>list_o</code>, i am trying to load <code>Fridge</code> from <code>contents.json</code>file, when JSON file has that comment, it gives me an error, when the JSON file doesn't have the comment, the script runs properly.</p>
  <p>I understand that comments is not proper JSON format, but is there any way to ignore comments of JSON file?</p>