Hi! I have a Json inside a FString like this:
[{"avatarId":"1","birthDate":"1972-12-14","gender":0,"id":"c12ef1771","nickname":"eldany"}]
then i created a USTRUCT that matches the same Json structure like this:
USTRUCT(BlueprintType)
struct FBackendStruct
{
GENERATED_BODY()
public:
int avatarId;
FString birthDate;
int gender;
FString id;
FString nickname;
};
next I try to deserialize the Json string in my struct like this:
FBackendStruct myJson;
FJsonObjectConverter::JsonObjectStringToUStruct(Result,&myJson,0,0);
nickname = myJson.nickname;
avatarId = myJson.avatarId;
birthDate = myJson.birthDate;
gender = myJson.gender;
playerID = myJson.id;
nickname = myJson.nickname;
I dont have compilation errors but I am receiving noise (bad data).
any help?