Interface ModelObject.Serializer
-
- All Implemented Interfaces:
public interface ModelObject.Serializer<T extends ModelObject>Interface that must be implemented and provided as a public SERIALIZER field that serializes the to and from a JSONObject.
-
-
Method Summary
Modifier and Type Method Description abstract JSONObjectserialize(T modelObject)Serialize the ModelObject to a JSONObject. abstract Tdeserialize(JSONObject jsonObject)Deserialize a JSONObject to a ModelObject. -
-
Method Detail
-
serialize
abstract JSONObject serialize(T modelObject)
Serialize the ModelObject to a JSONObject.
- Parameters:
modelObject- The Model class to be serialized.- Returns:
The result JSONObject
-
deserialize
abstract T deserialize(JSONObject jsonObject)
Deserialize a JSONObject to a ModelObject.
- Parameters:
jsonObject- The base object to deserialize.- Returns:
The ModelObject parsed with the contents from the JSONObject.
-
-
-
-