from typing import AnyStr
from typing import List
import json


def load_json_samples(path: AnyStr) -> List[str]:
    """
    Loads samples from a json file

    :param path: Path to the target file
    :return: List of samples
    """
    with open(path, "r", encoding="utf-8") as file:
        samples = json.load(file)

    if isinstance(samples, list):
        return samples

    else:
        raise RuntimeError(f"File's content must be list-like")