JsonObject jsonNotification = new JsonObject();
jsonNotification.put("id", notification.getId());
StringWriter notificationWriter = new StringWriter();
try {
if (notification instanceof TemplateNotification) {
TemplateContext templateContext = webInterface.getTemplateContextFactory().createTemplateContext().mergeContext(((TemplateNotification) notification).getTemplateContext());
JsonObject jsonNotification = new JsonObject();
jsonNotification.put("id", notification.getId());
StringWriter notificationWriter = new StringWriter();
try {
if (notification instanceof TemplateNotification) {
TemplateContext templateContext = webInterface.getTemplateContextFactory().createTemplateContext().mergeContext(((TemplateNotification) notification).getTemplateContext());