@Override
    public Roleschool addRoleFromGson(String json, long id) {
        Roleschool role = null;
        if (json.contains("Teacher")) {
            role = gson.fromJson(json, Teacher.class);
        }
        if (json.contains("Student")) {
            role = gson.fromJson(json, Student.class);
        }
        if (json.contains("Assistantteacher")) {
            role = gson.fromJson(json, Assistantteacher.class);
        }

        em.getTransaction().begin();
        Person person = em.find(Person.class, id);
        if (person != null && role != null) {
            person.setRoles(role);
        }
        em.getTransaction().commit();

        return role;
    }