def parse_json_file(filename):
    with open(filename, 'r') as jsonfile:
        content = jsonfile.read()
        try:
            result = json.loads(content)
        except ValueError:
            _logger.error(
                "Parsing file %s failed. Check syntax with a JSON validator:"
                "\nhttp://jsonlint.com/?json=%s", filename, quote(content))
            sys.exit(1)
    return result
Adds a message with the ``ERROR`` level.
dataset/ETHPy150Open MA3STR0/kimsufi-crawler/crawler.py/parse_json_file--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/messages/api.py/error