try {
Writer writer = new JsonIndentingWriter();
JSONValue.writeJSONString(mainConf, writer);
mainJsFile.appendToDataTablesConf(writer.toString());
} catch (IOException e) {
throw new WebResourceGenerationException("Unable to generate the JSON configuration", e);
}
return mainJsFile;
}