I want make a blueprint block to read a json file and parse as struct.
Below is my code in MyBlueprintFunctionLibrary.h
UFUNCTION(BlueprintPure, Category = "json")
static bool LoadJsonFromFile(FString& Text, UStruct* Struct, int check, int skip);
And MyBlueprintFunctionLibrary.cpp
bool UMyBlueprintFunctionLibrary::LoadJsonFromFile(FString& Text, UStruct* Struct, int check, int skip)
{
return FJsonObjectConverter::JsonObjectStringToUStruct(Text, Struct, check, skip);
}
And compile error :
Runtime/JsonUtilities/Public/JsonObjectConverter.h:154:57: error: no member named ‘StaticStruct’ in ‘UStruct’
return JsonObjectToUStruct(JsonObject, OutStructType::StaticStruct(), OutStruct, CheckFlags, SkipFlags);