diff --git a/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs b/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs index a5d9b0a4f..e7d877316 100644 --- a/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs +++ b/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs @@ -257,10 +257,19 @@ public string GetJsonStr(string varName) } else if (_responseData.Count >= 1 && !_responseData.ContainsKey(varName.ToLower())) { + #if NETCORE - sdt.FromJSonString(JsonSerializer.Serialize(_responseData), null); + string rData = JsonSerializer.Serialize(_responseData); + if (sdt.FromJSonString(rData, null)) + return sdt; + else + sdt.FromJSonString("{" + varName + ":" + rData + "}", null); #else - sdt.FromJSonString(JSONHelper.Serialize(_responseData), null); + string rData = JSONHelper.Serialize(_responseData); + if (sdt.FromJSonString(rData, null)) + return sdt; + else + sdt.FromJSonString("{" + varName + ":" + rData + "}", null); #endif } return sdt;