private void cleanUpAndFill(){
  ConfigKey[] keys=ConfigKey.values();
  Map<ConfigKey,Object> allConfigs=new HashMap<>(keys.length);
  for (  ConfigKey configKey : keys) {
    Object value=getAsObject(configKey);
    allConfigs.put(configKey,value);
  }
  json=new JSONObject();
  for (  HashMap.Entry<ConfigKey,Object> entry : allConfigs.entrySet()) {
    setFromObject(entry.getKey(),entry.getValue());
  }
}

private void cleanUpAndFill ( ) { ConfigKey [ ] keys = ConfigKey . values ( ) ; Map < ConfigKey , Object > allConfigs = new HashMap < > ( keys . length ) ; for ( ConfigKey configKey : keys ) { Object value = getAsObject ( configKey ) ; allConfigs . put ( configKey , value ) ; } json = new JSONObject ( ) ; for ( HashMap . Entry < ConfigKey , Object > entry : allConfigs . entrySet ( ) ) { setFromObject ( entry . getKey ( ) , entry . getValue ( ) ) ; } }
removes json nodes that do not belong in the file and fills it with missing values ' defaults then .
