def our_errmsg(msg, doc, pos, end=None):
    json.last_error_position = json.decoder.linecol(doc, pos)
return original_errmsg(msg, doc, pos, end)
json.decoder.errmsg = our_errmsg
try:
    data = json.loads('{1:}')
except ValueError as e:
    print(('error at', json.last_error_position))
How to get error location from json.loads in Python