public final class UnMarshaller
extends java.lang.Object
Constructor and Description |
---|
UnMarshaller() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getJsonFromNotifications(java.util.Set<UserNotification> notifications)
Creates a JSON string from a Set of
UserNotification s. |
static java.lang.String |
getJsonFromPersistentNotifications(java.util.Set<PersistentNotification> notifications)
Creates a JSON string from a Set of
PersistentNotification s. |
static java.util.Set<UserNotification> |
getNotificationsFromJson(java.net.URL url)
Creates a Set of
UserNotification s from JSON string which is queried from the given URL. |
static java.util.Set<PersistentNotification> |
getPersistentNotificationsFromJson(java.lang.String json)
Creates a Set of
PersistentNotification s from a JSON string. |
public static java.lang.String getJsonFromPersistentNotifications(java.util.Set<PersistentNotification> notifications) throws java.io.IOException
PersistentNotification
s.notifications
- the notificationsjava.io.IOException
- if writing the notifications as JSON failspublic static java.lang.String getJsonFromNotifications(java.util.Set<UserNotification> notifications) throws java.io.IOException
UserNotification
s.notifications
- the notificationsjava.io.IOException
- if writing the notifications as JSON failspublic static java.util.Set<UserNotification> getNotificationsFromJson(java.net.URL url) throws java.io.IOException
UserNotification
s from JSON string which is queried from the given URL.url
- the URL which is parsed as JSONUserNotification
sjava.io.IOException
- if reading the JSON from the URL failspublic static java.util.Set<PersistentNotification> getPersistentNotificationsFromJson(java.lang.String json) throws java.io.IOException
PersistentNotification
s from a JSON string.json
- the JSON string.PersistentNotification
java.io.IOException
- if reading the JSON from the string fails