applicationType = new ApplicationType<?>[0];
List<ApplicationCategory> appCategories = prService.getApplicationCategories(remoteUser, applicationType);
ApplicationCategoryToJSONPlugin toJSON = new ApplicationCategoryToJSONPlugin();
StringBuilder value = new StringBuilder();
JSONService jsonService = new JSONService();
jsonService.register(ApplicationCategory.class, toJSON);
if (appCategories.size() < 1)
return value;
value.append("{\n").append(" applicationRegistry : {\n");
for (int i = 0; i < appCategories.size(); i++)
{
ApplicationCategory category = appCategories.get(i);
jsonService.toJSONScript(category, value, 1);
if (i < appCategories.size() - 1)
value.append(" ,\n");
}
value.append(" }\n").append("}\n");