add a method to render notifications in json