@Override
    public JsonElement serialize(RoleSchool t, Type type, JsonSerializationContext jsc) {
        final JsonObject jsonObject = new JsonObject();
        
        jsonObject.addProperty("id", t.getId());
        if(t instanceof Student){
            Student student = (Student) t;
           jsonObject.addProperty("semester", student.getSemester());
        }
        if(t instanceof Teacher){
            Teacher teacher = (Teacher) t;
            jsonObject.addProperty("degree", teacher.getDegree());
        }
        if(t instanceof AssistentTeacher){
            AssistentTeacher at = (AssistentTeacher) t;
        }
        jsonObject.addProperty("roleName", t.getRoleName());
        return jsonObject;
    }