public final class JsonUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
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.
|
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 protocolMessageType an instance of MessageType for the passed in json.Copyright © 2014 JBoss by Red Hat. All Rights Reserved.