def _read_columns_file(f):
    """Return the list of column queries read from the given JSON file.

    :param f: path to the file to read
    :type f: string

    :rtype: list of dicts

    """
    try:
        columns = json.loads(open(f, 'r').read(),
                             object_pairs_hook=collections.OrderedDict)
    except Exception as err:
        raise InvalidColumnsFileError(
            "There was an error while reading {0}: {1}".format(f, err))

    # Options are not supported yet:
    if '__options' in columns:
        del columns['__options']

    return columns
def _read_columns_file ( f ) : try : columns = json . loads ( open ( f , 'r' ) . read ( ) , object_pairs_hook = collections . OrderedDict ) except Exception as err : raise InvalidColumnsFileError ( "There was an error while reading {0}: {1}" . format ( f , err ) ) if '__options' in columns : del columns [ '__options' ] return columns
Return the list of column queries read from the given JSON file.

    :param f: path to the file to read
    :type f: string

    :rtype: list of dicts