diff --git a/Config/BaseVaRest.ini b/Config/BaseVaRest.ini index 7659dd7d..0ad8fd95 100644 --- a/Config/BaseVaRest.ini +++ b/Config/BaseVaRest.ini @@ -9,9 +9,10 @@ +EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") +EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") +EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestRequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestRequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestRequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") ++EnumRedirects=(OldName="/Script/VaRest.ERequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") ++EnumRedirects=(OldName="/Script/VaRest.ERequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") ++EnumRedirects=(OldName="/Script/VaRest.ERequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") ++EnumRedirects=(OldName="/Script/VaRest.EHttpStatusCode",NewName="/Script/VaRest.EVaRestHttpStatusCode") +FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequest",NewName="VaRestRequestJSON.ConstructVaRestRequest") +FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequestExt",NewName="VaRestRequestJSON.ConstructVaRestRequestExt") +FunctionRedirects=(OldName="VaRestJsonObject.ConstructJsonObject",NewName="VaRestJsonObject.ConstructVaRestJsonObject") @@ -20,4 +21,4 @@ +FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueBool",NewName="VaRestSubsystem.ConstructJsonValueBool") +FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueArray",NewName="VaRestSubsystem.ConstructJsonValueArray") +FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueObject",NewName="VaRestSubsystem.ConstructJsonValueObject") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValue",NewName="VaRestSubsystem.ConstructJsonValue") ++FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValue",NewName="VaRestSubsystem.ConstructJsonValue") \ No newline at end of file diff --git a/Config/DefaultVaRest.ini b/Config/DefaultVaRest.ini index 8cc9aa52..0ad8fd95 100644 --- a/Config/DefaultVaRest.ini +++ b/Config/DefaultVaRest.ini @@ -9,10 +9,10 @@ +EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") +EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") +EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestRequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestRequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestRequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.EVaRestHttpStatusCode",NewName="/Script/VaRest.EVaRestHttpStatusCode") ++EnumRedirects=(OldName="/Script/VaRest.ERequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") ++EnumRedirects=(OldName="/Script/VaRest.ERequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") ++EnumRedirects=(OldName="/Script/VaRest.ERequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") ++EnumRedirects=(OldName="/Script/VaRest.EHttpStatusCode",NewName="/Script/VaRest.EVaRestHttpStatusCode") +FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequest",NewName="VaRestRequestJSON.ConstructVaRestRequest") +FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequestExt",NewName="VaRestRequestJSON.ConstructVaRestRequestExt") +FunctionRedirects=(OldName="VaRestJsonObject.ConstructJsonObject",NewName="VaRestJsonObject.ConstructVaRestJsonObject") diff --git a/README.md b/README.md index 9618f361..5ecd0d6a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Key features: Check the [Wiki](http://bit.ly/VaRest-Docs) for plugin usage examples and installation notes. -Current version: **1.1 R 29** (UE 4.24) +Current version: **1.1 R 30** (UE 4.25) ![SCREENSHOT](SCREENSHOT.jpg) diff --git a/Source/VaRest/Private/VaRestJsonObject.cpp b/Source/VaRest/Private/VaRestJsonObject.cpp index 4d5d914d..0466789b 100644 --- a/Source/VaRest/Private/VaRestJsonObject.cpp +++ b/Source/VaRest/Private/VaRestJsonObject.cpp @@ -46,7 +46,7 @@ void UVaRestJsonObject::SetRootObject(const TSharedPtr& JsonObject) FString UVaRestJsonObject::EncodeJson() const { FString OutputString; - TSharedRef Writer = FCondensedJsonStringWriterFactory::Create(&OutputString); + auto Writer = TJsonWriterFactory<>::Create(&OutputString); FJsonSerializer::Serialize(JsonObj, Writer); return OutputString; @@ -54,13 +54,9 @@ FString UVaRestJsonObject::EncodeJson() const FString UVaRestJsonObject::EncodeJsonToSingleString() const { - FString OutputString = EncodeJson(); - - // Remove line terminators - OutputString.Replace(LINE_TERMINATOR, TEXT("")); - - // Remove tabs - OutputString.Replace(LINE_TERMINATOR, TEXT("\t")); + FString OutputString; + auto Writer = FCondensedJsonStringWriterFactory::Create(&OutputString); + FJsonSerializer::Serialize(JsonObj, Writer); return OutputString; } diff --git a/Source/VaRest/Private/VaRestLibrary.cpp b/Source/VaRest/Private/VaRestLibrary.cpp index ab7efa81..4b3be13a 100644 --- a/Source/VaRest/Private/VaRestLibrary.cpp +++ b/Source/VaRest/Private/VaRestLibrary.cpp @@ -35,7 +35,8 @@ bool UVaRestLibrary::Base64Decode(const FString& Source, FString& Dest) bool Success = FBase64::Decode(Source, ByteArray); FUTF8ToTCHAR StringSrc = FUTF8ToTCHAR((const ANSICHAR*)ByteArray.GetData(), ByteArray.Num()); - Dest.AppendChars(StringSrc.Get(), StringSrc.Length() + 1); + Dest = FString(); + Dest.AppendChars(StringSrc.Get(), StringSrc.Length()); return Success; } @@ -48,6 +49,7 @@ bool UVaRestLibrary::Base64EncodeData(const TArray& Data, FString& Dest) return true; } + Dest = FString(); return false; } diff --git a/VaRest.uplugin b/VaRest.uplugin index 9c53ac85..73fe1182 100644 --- a/VaRest.uplugin +++ b/VaRest.uplugin @@ -2,11 +2,11 @@ "FileVersion" : 3, "FriendlyName" : "VaRest", - "Version" : 29, - "VersionName" : "1.1-r29.2", + "Version" : 30, + "VersionName" : "1.1-r30", "CreatedBy" : "Vladimir Alyamkin", "CreatedByURL" : "https://alyamkin.com", - "EngineVersion" : "4.24.0", + "EngineVersion" : "4.25.0", "Description" : "Plugin that makes REST (JSON) server communication easy to use", "Category" : "Network", "DocsURL": "https://bit.ly/VaRest-Docs",