com.vaadin.client.communication
Class Date_Serializer

java.lang.Object
  extended by com.vaadin.client.communication.Date_Serializer
All Implemented Interfaces:
JSONSerializer<java.util.Date>

public class Date_Serializer
extends java.lang.Object
implements JSONSerializer<java.util.Date>

Client side serializer/deserializer for java.util.Date

Since:
7.2
Author:
Vaadin Ltd

Constructor Summary
Date_Serializer()
           
 
Method Summary
 java.util.Date deserialize(Type type, JSONValue jsonValue, ApplicationConnection connection)
          Creates and deserializes an object received from the server.
 JSONValue serialize(java.util.Date value, ApplicationConnection connection)
          Serialize the given object into JSON.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Date_Serializer

public Date_Serializer()
Method Detail

deserialize

public java.util.Date deserialize(Type type,
                                  JSONValue jsonValue,
                                  ApplicationConnection connection)
Description copied from interface: JSONSerializer
Creates and deserializes an object received from the server. Must be compatible with JSONSerializer.serialize(Object, ApplicationConnection) and also with the server side JsonCodec.encode method.

Specified by:
deserialize in interface JSONSerializer<java.util.Date>
Parameters:
type - the type to deserialize
jsonValue - JSON map from property name to property value
connection - the application connection providing the context
Returns:
A deserialized object

serialize

public JSONValue serialize(java.util.Date value,
                           ApplicationConnection connection)
Description copied from interface: JSONSerializer
Serialize the given object into JSON. Must be compatible with JSONSerializer.deserialize(Type, JSONValue, ApplicationConnection) and also with the server side JsonCodec.decodeCustomType method.

Specified by:
serialize in interface JSONSerializer<java.util.Date>
Parameters:
value - The object to serialize
connection - the application connection providing the context
Returns:
A JSON serialized version of the object


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.