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