from pathlib import Path
from typing import Union
from typing import Dict
from typing import Any
from typing import List
import json


def read_json_file(
    src_path: Path
) -> Union[Dict[str, Any], List[Dict[str, Any]]]:
    """Reads json file and returns either python dict or python list."""
    if not src_path.exists():
        raise ValueError(
            'Provided json file does not exist!'
        )

    json_string = src_path.read_text()
    return json.loads(json_string)