-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on serializing response #48
Comments
|
Bro what if the response is an array of int. How can i get their values?
|
var obj = response.GetValue<YOUR_TYPE>(); replace YOUR_TYPE with the class name or the type you want to serialize to already mentioned in the Readme: |
I've tried doing that but it gives me error. The only time i dont have error is when i use IList as my class but not able to access the value |
check if the server send the correct data, maybe its a string rather that list of objects, and i recommend to use a list wrapper instead of a direct list without a debug log or a snippet of code i can't tell whats the cause of your problem. |
I'm tryring your sample code and i got this error
Severity Code Description Project File Line Suppression State Error CS0012 The type 'JsonElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Text.Json, Version=6.0.0.4
and
Severity Code Description Project File Line Suppression State Error CS0411 The type arguments for method 'SocketIOResponse.GetValue<T>(int)' cannot be inferred from the usage. Try specifying the type arguments explicitly
from this line of code.
ReceivedText.text += "Received On " + name + " : " + response.GetValue().GetRawText() + "\n";
The text was updated successfully, but these errors were encountered: