def load_json_path(path):
    """Load a file with the json module, but report errors better if it
    fails. And have it ordered too !"""
    with open(path) as handle:
        try: return json.load(handle, object_pairs_hook=collections.OrderedDict)
        except ValueError as error:
            message = "Could not decode JSON file '%s'." % path
            message = "-"*20 + "\n" + message + "\n" + str(error) + "\n" + "-"*20 + "\n"
            sys.stderr.write(message)
            raise error
def load_json_path ( path ) : with open ( path ) as handle : try : return json . load ( handle , object_pairs_hook = collections . OrderedDict ) except ValueError as error : message = "Could not decode JSON file '%s'." % path message = "-" * 20 + "\n" + message + "\n" + str ( error ) + "\n" + "-" * 20 + "\n" sys . stderr . write ( message ) raise error
Load a file with the json module, but report errors better if it
    fails. And have it ordered too !