[UE4]JsonObject和Fstring互相转换

JsonObject to Fstring

TSharedRef> Writer = TJsonWriterFactory<>::Create(&JsonStr);

FJsonSerializer::Serialize(JsonObject.ToSharedRef(), Writer);

 

FString to JsonObject

TSharedPtr JsonObject = MakeShareable(new FJsonObject);

TSharedRef< TJsonReader<> > Reader = TJsonReaderFactory<>::Create(JsonStr);

FJsonSerializer::Deserialize(Reader, JsonObject );

你可能感兴趣的:(UE4,c++)