title: How to get error location from json.loads in Python
body: <p>When I use json.loads in Python 3 and catch any resulting errors, like:</p>
  
  <pre><code>try:
    data = json.loads(string)
  except ValueError as err:
    print(err)
  </code></pre>
  
  <p>I get a helpful message like:</p>
  
  <pre><code>Expecting ',' delimiter: line 12 column 12 (char 271)
  </code></pre>
  
  <p>I would like to be able to display this to the user, along with exactly the location which is causing the problem (I am reading in user-written JSON). How can I get out the line and column?</p>
  
  <p>I could use a regex on err, but that feels like a bad idea, as I don't know if this message is internationalised, and could change in different versions of python. Is there a better way?</p>