Package com.vaadin.server.communication
Class DateSerializer
- java.lang.Object
-
- com.vaadin.server.communication.DateSerializer
-
- All Implemented Interfaces:
JSONSerializer<java.util.Date>
public class DateSerializer extends java.lang.Object implements JSONSerializer<java.util.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 java.util.Datedeserialize(java.lang.reflect.Type type, elemental.json.JsonValue jsonValue, ConnectorTracker connectorTracker)Creates and deserializes an object received from the client.elemental.json.JsonValueserialize(java.util.Date value, ConnectorTracker connectorTracker)Serialize the given object into JSON.
-
-
-
Method Detail
-
deserialize
public java.util.Date deserialize(java.lang.reflect.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<java.util.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(java.util.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<java.util.Date>- Parameters:
value- The object to serializeconnectorTracker- The connector tracker instance for the UI- Returns:
- A JSON serialized version of the object
-
-