@Override
    public RoleSchool deserialize(JsonElement je, Type typeOfT, JsonDeserializationContext jdc) throws JsonParseException {
        JsonObject jsonObject = je.getAsJsonObject();
        String type = jsonObject.get("roleName").getAsString();
        
        switch(type.toLowerCase()){
            case "student":
                String semester = jsonObject.get("semester").getAsString();
                Student student = new Student();
                student.setSemester(semester);
                return student;
            case "teacher":
                String degree = jsonObject.get("degree").getAsString();
                Teacher teacher = new Teacher();
                teacher.setDegree(degree);
                return teacher;
            case "assistent teacher":
                AssistentTeacher at = new AssistentTeacher();
                return at; 
            default:
                return null;
        }
    }