(新警报)
我正在使用Java-WebSocket和json-simple。
在用这个问题解决问题后如何在使用没有泛型的遗留代码时避免 Eclipse 警告put
?,我现在正在尝试,但我得到了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
我该怎么sendToAll
obj
办?