|
||||||||||
| 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, ApplicationConnection) and
deserialize(Type, JSONValue, ApplicationConnection) 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 Type.findSerializer().
This is the client side interface, see com.vaadin.server.communication.JSONSerializer for the server side interface.
| Method Summary | |
|---|---|
T |
deserialize(Type type,
JSONValue jsonValue,
ApplicationConnection connection)
Creates and deserializes an object received from the server. |
JSONValue |
serialize(T value,
ApplicationConnection connection)
Serialize the given object into JSON. |
| Method Detail |
|---|
T deserialize(Type type,
JSONValue jsonValue,
ApplicationConnection connection)
serialize(Object, ApplicationConnection) and
also with the server side JsonCodec.encode method.
type - the type to deserializejsonValue - JSON map from property name to property valueconnection - the application connection providing the context
JSONValue serialize(T value,
ApplicationConnection connection)
deserialize(Type, JSONValue, ApplicationConnection) and also
with the server side JsonCodec.decodeCustomType method.
value - The object to serializeconnection - the application connection providing the context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||