Closed rvarun11 closed 3 years ago
Agree, the DataSync API e.g. also added a helper called sendJSON
https://github.com/digitallyinduced/ihp/blob/master/IHP/DataSync/Controller.hs#L46 as a workaround for now you could import that function from IHP.DataSync.Controller
Thank you. That's better than using sendTextData
.
Should I keep this issue open?
yes 👍
The function is now exposed :) You can find docs here https://github.com/digitallyinduced/ihp/commit/4d93293b6cf9418373e4a01ae86485db14ed073a
Right now, the web socket controller only supports
sendTextData
to send data via the web socket controller and sending data via json only seems to be possible by usingText
and then parsing the JSON in the frontend as follows:This becomes very tedious especially if you more complex data and should be supported natively by IHP.