-
Notifications
You must be signed in to change notification settings - Fork 289
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
JSON array at top level of response #77
Comments
Hi @unktomi , Unfortunately top-level arrays are not supported by Epic's deserializer, but you can try to frame top level array as variable manually: |
Added as HowTo to the docs: https://hiazma.atlassian.net/wiki/display/VAR/HowTo%3A+Read+top-level+arrays |
Thanks for the workaround - however the Epic serializer as of at least 4.12 does seem to support deserializing a JSON Array: |
Thanks, I'll check it tomorrow |
One has to double quote the "myarray" field name. |
@ufna Responsecontent No work with lastest VaRest for UE4.19 |
For those who are looking for the solution here is what I did.
VaRestBpLibrary.cpp
This creates a Blueprint node that can decode the top-level array and it returns an Array of VaRestJsonObjects, which you can use in the blueprints. |
Hello,
I was trying to use VaRest to talk to a Philips Hue bridge. That device sends json responses with an Array not Object at the top level. It seems the response in VaRest is hardcoded to VaResttJsonObject. Apparently having an Array is legal Json:
RFC 4627:
"A JSON text is a serialized object or array."
Not sure what the best way to fix this is.
The text was updated successfully, but these errors were encountered: