Encodes the given input into the wire representation based on the data format.
the encoded wire representation of the payload.
the object to encode.
reified type of the object to encode.