import json


def get_n_classes(json_path: str):
    """ Get the number of classes in the dataset that correspond to the json file """
    with open(json_path) as json_file:
        n_classes = len(json.load(json_file))
    return n_classes