|
AeroGear SimplePush Server Protocol 0.11.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aerogear.simplepush.protocol.impl.json.JsonUtil
public final class JsonUtil
JSON utility class for transforming SimplePush messages to and from JSON.
| Method Summary | ||
|---|---|---|
static
|
fromJson(String json,
Class<T> type)
Transforms from JSON to the type specified. |
|
static MessageType |
parseFrame(String json)
A convenience method for transforming a SimplePush message frame into an instance of MessageType. |
|
static String |
toJson(Object obj)
Transforms from Java object notation to JSON. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T fromJson(String json,
Class<T> type)
json - the json to be transformed.type - the Java type that the JSON should be transformed to.
public static String toJson(Object obj)
obj - the Java object to transform into JSON.
String the json representation for the object.public static MessageType parseFrame(String json)
MessageType.
json - the JSON representing a message in the SimplePush protocol
MessageType an instance of MessageType for the passed in json.
|
AeroGear SimplePush Server Protocol 0.11.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||