发布于

UE中的JSON解析

FString JsonStr = TEXT("{"Name":"虚幻引擎"}");
TSharedRef<TJsonReader> JsonReader = TJsonReaderFactory::Create(JsonStr);

TSharedPtr<FJsonObject> JsonRoot;
if(FJsonSerializer::Deserialize(JsonReader,JsonRoot))
{
	FString Name = JsonRoot->GetStringField(TEXT("Name"));
	UE_LOG(LogTemp, Log, TEXT("=========%s"),*Name);
}
浏览 (595)
点赞
收藏
评论