Direct serialization of objects, without using Message class