scredis.serialization
Serializes an object into a byte array.
the object to be serialized
byte array of the serialized object
if an error occurs
Internal write method to be implemented.