add json to websocket request/response.