From 76d102bb656d3c237d46959727217a167d25c37b Mon Sep 17 00:00:00 2001 From: wyunchi-ms Date: Wed, 24 Feb 2021 17:57:12 +0800 Subject: [PATCH 1/2] Fix the issue of automation in string --- src/Automation/Automation/Common/PowershellJsonConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Automation/Automation/Common/PowershellJsonConverter.cs b/src/Automation/Automation/Common/PowershellJsonConverter.cs index 1504b514c58d..8150c8e37027 100644 --- a/src/Automation/Automation/Common/PowershellJsonConverter.cs +++ b/src/Automation/Automation/Common/PowershellJsonConverter.cs @@ -36,7 +36,7 @@ public static string Serialize(object inputObject) } if (inputObject is string @str) { - return str.Trim(); + return JsonConvert.SerializeObject(str.Trim()); } else if (inputObject is object[] @objectArray) { From 6a9b120fcba2c06071f5fa7dbc8d359fca3b1044 Mon Sep 17 00:00:00 2001 From: wyunchi-ms Date: Wed, 24 Feb 2021 18:01:23 +0800 Subject: [PATCH 2/2] Update Changelog.md --- src/Automation/Automation/ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Automation/Automation/ChangeLog.md b/src/Automation/Automation/ChangeLog.md index ab5b36fed5a8..7b647cb94bfa 100644 --- a/src/Automation/Automation/ChangeLog.md +++ b/src/Automation/Automation/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed the issue that string cannot be serialized correctly. [#14215] * Added Support for Python3 Runbook Type ## Version 1.4.3