import json


def get_boxnote_text(filepath):
    """Convert a boxnote to plain text.

    Parameters:
    filepath (str): the path to the boxfile

    Returns: the text of the boxfile as a string
    """

    f = open(filepath, encoding="utf8")
    text = json.loads(f.read())["atext"]["text"]
    f.close()
    return text