import glob


def _get_json_file(dirpath):
    """Returns the first .json filename it encounters on the passed directory
    path.

    :param dirpath: ``str`` name of the directory we're going to search for json
                    files.
    :return: the first json filename we encounter.
    """
    file_list = glob.glob(dirpath + '/*.json')
    return file_list[0]