better support for websocket with json data