|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JSONSerializer<T>
Implementors of this interface knows how to serialize an Object of a given
type to JSON and how to deserialize the JSON back into an object.
The #serialize(Object, ConnectorMap)
and
#deserialize(JSONObject, ConnectorMap)
methods must be symmetric so
they can be chained and produce the original result (or an equal result).
Each JSONSerializer
implementation can handle an object of a single
type - see SerializerMap
.
Method Summary | |
---|---|
T |
deserialize(Type type,
com.google.gwt.json.client.JSONValue jsonValue,
ApplicationConnection connection)
Creates and deserializes an object received from the server. |
com.google.gwt.json.client.JSONValue |
serialize(T value,
ApplicationConnection connection)
Serialize the given object into JSON. |
Method Detail |
---|
T deserialize(Type type, com.google.gwt.json.client.JSONValue jsonValue, ApplicationConnection connection)
#serialize(Object, ConnectorMap)
and also with
the server side
JsonCodec#encode(Object, com.vaadin.terminal.gwt.server.PaintableIdMapper)
.
jsonValue
- JSON map from property name to property value
com.google.gwt.json.client.JSONValue serialize(T value, ApplicationConnection connection)
#deserialize(JSONObject, ConnectorMap)
and also with the server
side
JsonCodec#decode(com.vaadin.external.json.JSONArray, com.vaadin.terminal.gwt.server.PaintableIdMapper)
value
- The object to serialize
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |