Serialize self to MessagePack bytes

Set plain = true to generate standard MessagePack, without deserialization metadata. Use this option if the generated MessagePack will be read by non-Nit programs. Use the default, plain = false, if the MessagePack bytes are to be deserialized by a Nit program.

Property definitions

msgpack :: serialization_write $ Serializable :: serialize_msgpack
	# Serialize `self` to MessagePack bytes
	#
	# Set `plain = true` to generate standard MessagePack, without deserialization metadata.
	# Use this option if the generated MessagePack will be read by non-Nit programs.
	# Use the default, `plain = false`, if the MessagePack bytes are to be deserialized by a Nit program.
	fun serialize_msgpack(plain: nullable Bool): Bytes
	do
		var stream = new BytesWriter
		stream.serialize_msgpack(self, plain)
		stream.close
		return stream.bytes
	end
lib/msgpack/serialization_write.nit:176,2--187,4