Hello Community!
I've been out of the loop with serializing and deserializing Json in C++. I know in C#, say example I have this
And for the serialized class class
I see everywhere online on how to retrieve the JSON text into a FJsonObject and FJsonReader, but I'm unsure on the steps to deserialize
C# (Unity) example
How would one be able to deserialize a Person class from JSON in UE4 C++? Am I able to deserialize the values in a class/struct like this?
I've been out of the loop with serializing and deserializing Json in C++. I know in C#, say example I have this
Code:
{ "Name" : "Dude", "Age" : 12, "Occupation" : "duder" }
Code:
[Serializable] public class Person { public string Name; public int Age; public string Occupation; }
C# (Unity) example
Code:
string jsonString = /* DO FILE IO STUFF TO GET JSON file as string */ Person person = JsonUtility.FromJson<Person>(jsonString);
Comment