FJsonObjectConverter::JsonObjectStringToUStruct not populating field

Hi,

Hopefully, I’m not being an idiot here, maybe it’s too late but I’m wondering if someone might help?

I’m using this code:



FMessageResponse MessageResponse;
FJsonObjectConverter::JsonObjectStringToUStruct("{\"message\":\"Some message.\"}", &MessageResponse, 0, 0);


My Struct is simply



USTRUCT(BlueprintType)
struct FMessageResponse {
GENERATED_BODY()

FString message;

FMessageResponse() {}
};

When the code executes the message field remains blank when it should be populated with “Some message” any help would be appreciated thanks.

It was late and i was being an idiot!



USTRUCT(BlueprintType)
struct FMessageResponse {
GENERATED_BODY()

FText message;

FMessageResponse() {}
};


Should be



USTRUCT(BlueprintType)
struct FMessageResponse {
GENERATED_BODY()

UPROPERTY()
FText message;

FMessageResponse() {}
};


Just missing the UPROPERTY() off of the field

:facepalm