com.metaparadigm.jsonrpc.serializer.impl
Class DateSerializer
java.lang.Object
com.metaparadigm.jsonrpc.serializer.AbstractSerializer
com.metaparadigm.jsonrpc.serializer.impl.DateSerializer
- All Implemented Interfaces:
- Serializer, java.io.Serializable
public class DateSerializer
- extends AbstractSerializer
- See Also:
- Serialized Form
|
Method Summary |
java.lang.Class[] |
getJSONClasses()
Get the json java classes that this Serializer is able to serialize from json into java
and deserialize into json from java. |
java.lang.Class[] |
getSerializableClasses()
Get the java classes that this Serializer is able to serialize from java into
json and deserialize into java from json. |
java.lang.Object |
marshall(SerializerState state,
java.lang.Object o)
Marshall a java object into an equivalent json object. |
ObjectMatch |
tryUnmarshall(SerializerState state,
java.lang.Class clazz,
java.lang.Object o)
|
java.lang.Object |
unmarshall(SerializerState state,
java.lang.Class clazz,
java.lang.Object o)
Unmarshall json into an equivalent java object. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateSerializer
public DateSerializer()
getJSONClasses
public java.lang.Class[] getJSONClasses()
- Description copied from interface:
Serializer
- Get the json java classes that this Serializer is able to serialize from json into java
and deserialize into json from java.
These will typically be primitive class type wrappers or JSONObject, JSONArray.
- Returns:
- json side java classes that can be serialized/deserialized by this serializer.
getSerializableClasses
public java.lang.Class[] getSerializableClasses()
- Description copied from interface:
Serializer
- Get the java classes that this Serializer is able to serialize from java into
json and deserialize into java from json.
- Returns:
- java side classes that can be serialized/deserialized by this serializer.
marshall
public java.lang.Object marshall(SerializerState state,
java.lang.Object o)
throws MarshallException
- Description copied from interface:
Serializer
- Marshall a java object into an equivalent json object.
- Parameters:
state - can be used to hold state while unmarshalling through recursive levels.o - java object to marhsall into json.
- Returns:
- that JSONObject or JSONArray that contains the json representation of the java object that was marshalled.
- Throws:
MarshallException - if there is a problem marshalling java to json.
tryUnmarshall
public ObjectMatch tryUnmarshall(SerializerState state,
java.lang.Class clazz,
java.lang.Object o)
throws UnmarshallException
- Throws:
UnmarshallException
unmarshall
public java.lang.Object unmarshall(SerializerState state,
java.lang.Class clazz,
java.lang.Object o)
throws UnmarshallException
- Description copied from interface:
Serializer
- Unmarshall json into an equivalent java object.
- Parameters:
state - can be used to hold state while unmarshalling through recursive levels.clazz - optional java class to unmarshall to.o - JSONObject or JSONArray that contains the json to unmarshall.
- Returns:
- the java object representing the json that was unmarshalled.
- Throws:
UnmarshallException - if there is a problem unmarshalling json to java.
Copyright © 2005 Metaparadigm Pte Ltd.