import json


def read_file(file_path, is_json=False):
    """
    Reads the content of a file.
    :param file_path: path of the file
    :param is_json: True if it's a json file
    :return: file's content
    """
    with open(file_path, 'r') as infile:
        if is_json:
            content = json.load(infile)
        else:
            content = infile.read()
    return content