How to retrieve single text field from Json?
Currently I have got a json file from the Met Office printed in its entirety to the screen as a string but I wish to be able to print selected values from the json to the screen. As the json is nested I have constructed USTRUCTS to store the converted values to. For example:
This is the main USTRUCT which contains the other USTRUCTs. The other USTRUCTs contain FString variables to store the values from the JsonString.
My problem lies in that my UStructs are empty and I am uncertain how to populate them with the relevant values from the JSonObject. Here is my method so far.
Hit a blocker with this and was hoping for some assistance; any help would be appreciated.
asked Mar 17 '16 at 05:53 PM in C++ Programming
Ok first things first forget about the USTRUCTS and FJsonObjectConverter for now.
Here is my simple solution:
It is far from elegant but it works for the little data I am using it for. The object arrays were more fun but I will not clutter up this space with them unless someone asks.
Hope this helps someone.
answered Mar 19 '16 at 04:07 PM
I've added quite a bit of details to this question: https://answers.unrealengine.com/questions/81533/how-do-i-perform-basic-json-operations-loop-proper.html
It gives an overview and simple example from start to finish on how to work with Json. Maybe it will solve your problem.
answered Mar 18 '16 at 09:52 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here