I'm trying to send a message to the websocket server on my FME Cloud instance. I can successfully transmit the following:
{"ws_op" : "send","ws_msg" : "hello"}
But I want to send a JSON message as "ws_msg", so I tried:
{"ws_op" : "send","ws_msg" : fme_get_attribute("payload")}
Which isn't received on the other end, similarly to if we have an incorrect message, i.e. without the "send message"-format from the documentation of the WebSocketSender. I would guess it's something with the quotes around the message, but I am unable to escape quotes in the message formatting window.
So, how can I send a JSON message (Payload-attribute attached) to a websocket using FME?
{
"type": "Feature",
"properties": {
"icon-image": "pulsing-dot-blue"},
"geometry": {
"type": "Point",
"coordinates": [
17.3016102,
59.6615453
]
}
}