from typing import Any
from pathlib import Path
import json


def read_json_file(path: str) -> Any:
    """Read result from file

    Args:
        path (str): path of result file

    Returns:
        [Any]: content of the file
    """
    file_path = Path(path)
    if not file_path.is_file():
        raise RuntimeError(f'Invalid file to read {path}')
    with open(file_path, 'r') as f:
        return json.load(f)