You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're getting this error because your JSON type is an object not a string. The function As String tries to interpret a json value to a string, since it is not a string, but an object, it is throwing that warning.
What you want to do however is to convert an SIOJson Value or Object to its JSON string representation. To do this you need to use the function EncodeJsonString instead.
I believe the documentation is a bit hazy on this and it may be good to have an implicit conversion from the As String function. I guess that depends on whether UE4 developers prefer explicit typing or more javascript like duck typing behavior.
Hello developers,
It seems the "As string" blueprint node is failing to convert the JSON message to string.
For all the combinations I have tried, I get the following in the output log:
LogJson: Error: Json Value of type 'Object' used as a 'String'.
Attaching the combinations that I tried and failed:
My approach was almost the same as the third image in the project's home page(https://github.com/getnamo/socketio-client-ue4):
Apparently, the data format from the socket seems correct as the following blueprint works fine:
Response that I am sending from the server:
emit('connection response', {'data': 'Connected'}) where,
'connection response' is the event and
'{'data': 'Connected'}' is the JSON message
UE version: 4.17.1
Thank you.
The text was updated successfully, but these errors were encountered: