def json_default(o):
    """
    Defining the default behavior of conversion of a class to a JSON-able object.
    Essentially makes a dictionary out of the class and returns it. Returns a list of
    all its elements in case of a set.
    :param o: The object to convert to JSON.
    :return: JSON-able version of the class.
    """
    if isinstance(o, set):
        return list(o)
    return o.__dict__