Package com.vaadin.server.communication
Class DateSerializer
- java.lang.Object
-
- com.vaadin.server.communication.DateSerializer
-
- All Implemented Interfaces:
JSONSerializer<Date>
public class DateSerializer extends Object implements JSONSerializer<Date>
Server side serializer/deserializer for java.util.Date- Since:
- 7.2
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description DateSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
deserialize(Type type, JsonValue jsonValue, ConnectorTracker connectorTracker)
Creates and deserializes an object received from the client.JsonValue
serialize(Date value, ConnectorTracker connectorTracker)
Serialize the given object into JSON.
-
-
-
Method Detail
-
deserialize
public Date deserialize(Type type, JsonValue jsonValue, ConnectorTracker connectorTracker)
Description copied from interface:JSONSerializer
Creates and deserializes an object received from the client. Must be compatible withJSONSerializer.serialize(Object, ConnectorTracker)
and also with the client side com.vaadin.client.communication.JSONSerializer.- Specified by:
deserialize
in interfaceJSONSerializer<Date>
- Parameters:
type
- The expected return typejsonValue
- the value from the JSONconnectorTracker
- the connector tracker instance for the UI- Returns:
- A deserialized object
-
serialize
public JsonValue serialize(Date value, ConnectorTracker connectorTracker)
Description copied from interface:JSONSerializer
Serialize the given object into JSON. Must be compatible withJSONSerializer.deserialize(Type, JsonValue, ConnectorTracker)
and the client side com.vaadin.client.communication.JSONSerializer- Specified by:
serialize
in interfaceJSONSerializer<Date>
- Parameters:
value
- The object to serializeconnectorTracker
- The connector tracker instance for the UI- Returns:
- A JSON serialized version of the object
-
-