public void setOnConfigChanged(Runnable runnable) {
        Field[] fields = this.getClass().getDeclaredFields();
        for (Field field : fields) {
            try {
                field.setAccessible(true);
                Object value = field.get(this);

                if (value instanceof ObservableValue) {
                    ((ObservableValue) value).addListener((observable, oldValue, newValue) -> {
                        if (Objects.nonNull(newValue)) {
                            runnable.run();
                        }
                    });
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
Creates a JSON object which represents the current configuration of this object.
The JSON object is e.g. used when saving the configuration to a file.  
@return a JsonObject representing the current state of the configuration
src/main/java/com/kodedu/config/ConfigurationBase.java