If you are using Windows, you need to use a different form of quoting on the command line. Run this instead:
publish stream1 key3 "{\"text\":\"hello world!\"}"
and getting following error:
F:\multichain-windows-1.0.5>multichain-cli chain1 publish stream1 key3 "{\"text\":\"hello world!\"}"
{"method":"publish","params":["stream1","key3","{\"text\":\"hello world!\"}"],"id":1,"chain_name":"chain1"}
error code: -8
error message:
Item data should be hexadecimal string
please help.