Closed r4reejh closed 5 years ago
I've just pushed a fix. Could you test this and let me know if it works? I'll test properly once I'm done with the SDK. Once the SDK gets done, we'll have a lot more freedom to work with these things. We're kinda crippled without the SDK right now. I'll get that done ASAP.
still throwing error
|Error|WebSocket.messagec|System.ArgumentException: Can not convert Object to String.
at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject[T]()
at Kai.Module.KaiListener.Handle(String data)
at WebSocketSharp.Ext.Emit[TEventArgs](EventHandler`1 eventHandler, Object sender, TEventArgs
e)
at WebSocketSharp.WebSocket.messagec(MessageEventArgs e)
Is there an example Json that I can use to reproduce this?
I got it for this
{"type":"authenticate", "success":true, "authenticated":true}
Reverted back to ToObject<T>()
under a try/catch. It's less verbose, doesn't explain a lot, but will do for now until that function is implemented properly
Encountered problems with types:
modifying code from:
to
eliminates the error.
Error encountered when Parsing incoming data: