String base = req.getParameter("base");
ILibInfo[] installedLibs = user.getLibs(base);
JSONWriter jsonWriter = new JSONWriter(true);
jsonWriter.startObject().addFieldName("userLibs").startArray();
ILibraryManager libMan = ServerManager.getServerManager().getLibraryManager();
for (int i = 0; i < installedLibs.length; i++) {
String id = installedLibs[i].getId();
String version = installedLibs[i].getVersion();
Library lib = libMan.getLibrary(id, version);
/* if library doesn't exist continue */
if (lib == null) {
continue;
}
jsonWriter.startObject().addField("id", id);