|
||||||||||
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, ConnectorTracker)
and
deserialize(Type, JsonValue, ConnectorTracker)
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.
This is the server side interface, see com.vaadin.client.communication.JSONSerializer for the client side interface.
Method Summary | |
---|---|
T |
deserialize(java.lang.reflect.Type type,
elemental.json.JsonValue jsonValue,
ConnectorTracker connectorTracker)
Creates and deserializes an object received from the client. |
elemental.json.JsonValue |
serialize(T value,
ConnectorTracker connectorTracker)
Serialize the given object into JSON. |
Method Detail |
---|
T deserialize(java.lang.reflect.Type type, elemental.json.JsonValue jsonValue, ConnectorTracker connectorTracker)
serialize(Object, ConnectorTracker)
and also
with the client side com.vaadin.client.communication.JSONSerializer.
type
- The expected return typejsonValue
- the value from the JSONconnectorTracker
- the connector tracker instance for the UI
elemental.json.JsonValue serialize(T value, ConnectorTracker connectorTracker)
deserialize(Type, JsonValue, ConnectorTracker)
and the client
side com.vaadin.client.communication.JSONSerializer
value
- The object to serializeconnectorTracker
- The connector tracker instance for the UI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |