// Extension custom configuration generator
if (extension.getConfigGenerator() != null) {
logger.debug("Custom configuration generator used: {}", extension.getConfigGenerator().getClass()
.getSimpleName());
Writer writer = new JsonIndentingWriter();
Map<String, Object> conf = extension.getConfigGenerator().generateConfig(table);
// Allways pretty prints the JSON
try {
JSONValue.writeJSONString(conf, writer);
} catch (IOException e) {
throw new ExtensionLoadingException("Unable to convert the configuration into JSON", e);
}
mainJsFile.appendToDataTablesExtraConf(writer.toString());
}
}