Serializes an object into a string variable for easy 'manual' serialization