Package io.ran
Interface ISerializer
public interface ISerializer
Used to convert objects to and from strings for storage in the database, for cases where the database does not
 support the type natively and no converter is available.
 
This can also be used in cases where backwards compatibility is required.
- 
Method SummaryModifier and TypeMethodDescriptiondefault <T> Tdeserialize(Clazz<T> clazz, String value) Deserialize a string into an object of the given class.<T> Tdeserialize(Class<T> clazz, String value) Deserialize a string into an object of the given class.<T> Stringserialize(T object) Serialize an object into a string.
- 
Method Details- 
deserializeDeserialize a string into an object of the given class.For objects with no generics, this is the same as calling deserialize(Clazz, String)with aClazzobject.For objects with generics this may not preserve the type information, and deserialize(Clazz, String)should be used instead.- Type Parameters:
- T- The type of the object to deserialize.
- Parameters:
- clazz- The class to deserialize into.
- value- The string to deserialize.
- Returns:
- An instance of the given class, deserialized from the given string.
 
- 
deserializeDeserialize a string into an object of the given class.Contains a more informed Clazzobject instead of the basic JavaClass.By default, this delegates to the existing deserialize(Class, String)method, but can be overridden to provide more information about the class being deserialized to the deserializer.- Type Parameters:
- T- The type of the object to deserialize.
- Parameters:
- clazz- The class to deserialize into.
- value- The string to deserialize.
- Returns:
- An instance of the given class, deserialized from the given string.
 
- 
serializeSerialize an object into a string.- Type Parameters:
- T- The type of the object to serialize.
- Parameters:
- object- The object to serialize.
- Returns:
- A string representation of the given object.
 
 
-