private boolean set(Object object, String fieldName, String fieldValue) throws IllegalArgumentException, IllegalAccessException {
        Class<?> clazz = object.getClass();
        while (clazz != null) {
            try {
                Field field = clazz.getDeclaredField(fieldName);
                String type = field.getType().getSimpleName();
                field.setAccessible(true);
                switch (type) {
                    case "long": {
                        long castedValue = Long.parseLong(fieldValue);
                        field.setLong(object, castedValue);
                        return true;
                    }
                    case "int": {
                        int castedValue = Integer.parseInt(fieldValue);
                        field.setInt(object, castedValue);
                        return true;
                    }
                    case "float": {
                        float castedValue = Float.parseFloat(fieldValue);
                        field.setFloat(object, castedValue);
                        return true;
                    }
                    case "double": {
                        double castedValue = Double.parseDouble(fieldValue);
                        field.setDouble(object, castedValue);
                        return true;
                    }
                    case "short": {
                        short castedValue = Short.parseShort(fieldValue);
                        field.setShort(object, castedValue);
                        return true;
                    }
                    case "boolean": {
                        boolean castedValue = Boolean.parseBoolean(fieldValue);
                        field.setBoolean(object, castedValue);
                        return true;
                    }
                    default:
                        field.set(object, fieldValue);
                        return true;
                }

            } catch (NoSuchFieldException ex) {
                clazz = clazz.getSuperclass();
            }
        }
        return false;
    }