|
||||||||||
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, Object, 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,
java.lang.Object jsonValue,
ConnectorTracker connectorTracker)
Creates and deserializes an object received from the client. |
java.lang.Object |
serialize(T value,
ConnectorTracker connectorTracker)
Serialize the given object into JSON. |
Method Detail |
---|
T deserialize(java.lang.reflect.Type type, java.lang.Object jsonValue, ConnectorTracker connectorTracker)
serialize(Object, ConnectorTracker)
and also
with the client side com.vaadin.client.communication.JSONSerializer.
The json parameter is of type Object as org.json JSON classes have no other common super class
type
- The expected return typejsonValue
- the value from the JSONconnectorTracker
- the connector tracker instance for the UI
java.lang.Object serialize(T value, ConnectorTracker connectorTracker)
#deserialize(Object, 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 |