title: Lenient JSON Parser for Python
body: <p>Is there a "lenient" JSON Parser for Python?</p>
  
  <p>I keep getting (handwritten) JSON files such as this:</p>
  
  <pre class="lang-js prettyprint-override"><code>/* This JSON file is created by someone who does not know JSON
     And not competent enough to search about "JSON Validators" */
  
  {
  
    /* Hey look!
       A honkin' block comment here!
       Yeehaw */
  
    "key1": "value1",  // Hey look there's a standard-breaking comment here!
    "key3": .65,       // I'm too lazy to type "0"
    "key4": -.75,      // That "other" .Net program works anyways...
    "key5": [ 1 /* One */, 2 /* Two */, 3 /* Three */, 4 /* Four */],
    "key2": "value2",  // Whoopsie, forgot to delete the comma here...
  }
  </code></pre>
  
  <p>The program that actually consumed those monstrously malformed JSON files <em>somehow</em> doesn't puke on those errors. That program is written using C#, by the way.</p>
  
  <p>I'm writing some scripts in Python that will perform things based on those JSON files, but it keeps crashing (correctly) on those mistakes.</p>
  
  <p>I <em>can</em> manually edit those .json files to be standard-compliant... but there are a LOT of them and thus it's too effort-intensive -- not to mention that I will have to keep editing new incoming JSON files, urgh.</p>
  
  <p>So, back to my question, is there a <strong><em>lenient</em></strong> JSON parser that can consume those malformed JSON files without dying?</p>
  
  <p><strong>Note:</strong> <a href="https://stackoverflow.com/questions/56592689/python-remove-comma-of-last-object-in-a-string-for-valid-json">This question</a> concerns only trailing comma of last object; it does NOT handle block-comments and/or inline comments.</p>
  
  <hr>
  
  <p><strong>Edit:</strong> What the... I just received a JSON file in which the creator decided to remove leading zero for 0 &lt; numbers &lt; 1 ... -_-</p>
  
  <p>And I discovered a file where the comment is embedded... :fuming_red:</p>
  
  <p>I'll update the example above to reflect my additional "findings"...</p>