'Serializes the necessary members of the CourseTab object to a json-serializable representation.
This method is overridden by subclasses that have more members to serialize.
Returns:
a dictionary with keys for the properties of the CourseTab object.'

def to_json(self):

    to_json_val = {'type': self.type, 'name': self.name, 'course_staff_only': self.course_staff_only}
    if self.is_hidden:
        to_json_val.update({'is_hidden': True})
    return to_json_val
