Skip to main content
Question

remove a string from WebSocket

  • March 5, 2023
  • 1 reply
  • 11 views

boubcher
Contributor
Forum|alt.badge.img+11

Hello There

I am using FME to generate a WebSocket stream, on the desktop we are getting the valid JSON format, but when published to the server I am getting an extract Caracter ( " \\") backslash

--------------------------------------

{ "ws_publisher_content": "{ \\"type\\" : \\"FeatureCollection\\", \\"Features\\" : [ { \\"type\\" : \\"Features\\", \\"geometry\\" : { \\"type\\" : \\"Point\\", \\"coordinates\\" : [ 48.740187789955101, 27.965531016954699 ] }, \\"properties\\" : { \\"truck_plate\\" : \\"YHSR2379\\", \\"latitude\\" : 27.965531016954699, \\"longitude\\" : 48.740187789955101, \\"event_type\\" : null, \\"event_color\\" : null, \\"severity\\" : null, \\"status\\" : \\"On_Road\\", \\"counter\\" : 1562, \\"time_stampe\\" : 20230115061550 } } ] }", "ws_topic": "esr_geoevent_demo", "fns_type": "ws_publisher" }

-----------------------------------------------

the app consuming this web socket will not accept this structure

Thanks

 

1 reply

siennaatsafe
Safer
Forum|alt.badge.img+12
  • Safer
  • 214 replies
  • March 9, 2023

Hi @boubcher​ ,

 

Sorry, you are encountering this issue. I tried to reproduce it but have been unable to so far. Would you mind sharing your workspace? If you can't share the entire workspace, just the WebSocket Sender would be fine, if I can take a look at the JSON produced. Also, how are you viewing the WebSocket stream? Is it on FME Server or another tool?