serialize
Serializes this object to a string using the specified serializer and format.
Return
The serialized string representation of this object.
Parameters
serializer
The KSerializer to use for serialization.
format
The StringFormat to use for encoding (default: jsonForMachines).