Serialization before message sending