|
||||||||||
| 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(com.google.gwt.json.client.JSONObject jsonValue,
ConnectorMap idMapper,
ApplicationConnection connection)
Creates and deserializes an object received from the server. |
com.google.gwt.json.client.JSONObject |
serialize(T value,
ConnectorMap idMapper,
ApplicationConnection connection)
Serialize the given object into JSON. |
| Method Detail |
|---|
T deserialize(com.google.gwt.json.client.JSONObject jsonValue,
ConnectorMap idMapper,
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 valueidMapper - mapper from paintable id to paintable, used to decode
references to paintables
com.google.gwt.json.client.JSONObject serialize(T value,
ConnectorMap idMapper,
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 serializeidMapper - mapper from paintable id to paintable, used to decode
references to paintables
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||