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 Datedeserialize(Type type, elemental.json.JsonValue jsonValue, ConnectorTracker connectorTracker)Creates and deserializes an object received from the client.elemental.json.JsonValueserialize(Date value, ConnectorTracker connectorTracker)Serialize the given object into JSON.
-
-
-
Method Detail
-
deserialize
public Date deserialize(Type type, elemental.json.JsonValue jsonValue, ConnectorTracker connectorTracker)
Description copied from interface:JSONSerializerCreates 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:
deserializein 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 elemental.json.JsonValue serialize(Date value, ConnectorTracker connectorTracker)
Description copied from interface:JSONSerializerSerialize the given object into JSON. Must be compatible withJSONSerializer.deserialize(Type, JsonValue, ConnectorTracker)and the client side com.vaadin.client.communication.JSONSerializer- Specified by:
serializein interfaceJSONSerializer<Date>- Parameters:
value- The object to serializeconnectorTracker- The connector tracker instance for the UI- Returns:
- A JSON serialized version of the object
-
-