Serializes the input obj.
SerializedBytes containing the serialized representation of the input object.
The object to serialize.