【发布时间】:2013-07-20 23:31:39
【问题描述】:
(新警报)
我正在使用Java-WebSocket 和json-simple。
在用这个问题How to avoid Eclipse warnings when using legacy code without generics? 解决了putting 到JSONObject 的问题后,我现在正在尝试sendToAll obj 但我越来越了
error: method sendToAll in class WebSocketServerBase cannot be applied
to given types;
ws.sendToAll(obj);
^
required: String
found: JSONObject
reason: actual argument JSONObject cannot be converted to String by method
invocation conversion
1 error
我怎样才能sendToAllobj?
【问题讨论】:
标签: java json websocket type-conversion invocation