it seems the port was missing when building the websocket url. shouldn't the port be in uri.authority, at least wikipedia says so?
use external com.adobe.serialization.json.JSON instead of JSON, b/c it has working Dictionary serialization