encodeMessagesToString
Encodes the given messages object to a String representation using the StringFormat.
Receiver
StringFormat, e.g. Json
Return
The encoded String representation of the Messages object.
Parameters
messages
The Messages object that needs to be encoded.