Hi Stefander,
TL ; DR ; all the 20 pages of this thread: is there anybody in your knowledge which already recompiled and used your sources on macOS?
thanks,
Aaron
Rod Villani:
@vejay24 There are two problems there:
Look at the order of the errors: first, it did not find the field and THEN it said the data is invalid. It means you tried to get the field BEFORE you got the answer from the server. After using GetJSONRequest, from its return value call Bind Event to OnGetResult. After that event is called you can search the fields in the from the server.
As it says on the second error, the from the server is invalid. I see it’s actually valid , but Unreal won’t accept JSONs from which ROOT is an array, like yours. So you’ll have to make this array a field from some root object.
Actually it’s an array INSIDE an object that’s INSIDE an unnamed array. You have to get to it’s level by getting the objects that contain it, but since the root array is unnamed you won’t be able to even find it.
So, instead of having
{
"id" : 1,
"ServerConfig" : ]
},
{
"id" : 1,
"ServerConfig" : ]
}
]
You’ll need something like this
{
"data" :
{
"id" : 1,
"ServerConfig" : ]
},
{
"id" : 1,
"ServerConfig" : ]
}
]
}
And then it’ll be valid for Unreal and you can get the array using GetObjectArrayField(data) and, for each element, use GetObjectArrayField(ServerConfig)
Hello, sorry for my bad in english. this is an amazing plugin. I am new in Unreal Engine and want try to get data use . But my problem is API output show code like number 1, how can I change the code to like number 2 in Blueprint? Because I can’t change the API code. I try to convert to string, add string “{ “data” :” + + “}” but I don’t know hot to achieve that. Thanks…
RVillani
(Rod Villani)
June 17, 2020, 5:26am
320
Hello, sorry for my bad in english. this is an amazing plugin. I am new in Unreal Engine and want try to get data use . But my problem is API output show code like number 1, how can I change the code to like number 2 in Blueprint? Because I can’t change the API code. I try to convert to string, add string “{ “data” :” + + “}” but I don’t know hot to achieve that. Thanks…
Use the Append node to make the valid . You can add as many inputs to it as you need and combine the strings like this:
How i used in 4.23
thank you