Payload serialization in DataIOEvent

Added support for serialization of the payload in events.