public interface JSONSerializer<T>
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.
Modifier and Type | Method and Description |
---|---|
T |
deserialize(Type type,
JsonValue jsonValue,
ConnectorTracker connectorTracker)
Creates and deserializes an object received from the client.
|
JsonValue |
serialize(T value,
ConnectorTracker connectorTracker)
Serialize the given object into JSON.
|
T deserialize(Type type, 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 UIJsonValue serialize(T value, ConnectorTracker connectorTracker)
deserialize(Type, JsonValue, ConnectorTracker)
and the client
side com.vaadin.client.communication.JSONSerializervalue
- The object to serializeconnectorTracker
- The connector tracker instance for the UICopyright © 2018 Vaadin Ltd. All rights reserved.