diff --git a/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs b/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs index adb35bd5f..0be2afbf5 100644 --- a/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs +++ b/dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs @@ -258,9 +258,15 @@ public string GetJsonStr(string varName) else if (_responseData.Count >= 1 && !_responseData.ContainsKey(varName.ToLower())) { #if NETCORE - sdt.FromJSonString("{" + varName + ":" + JsonSerializer.Serialize(_responseData) + "}", null); + if (sdt.FromJSonString(JsonSerializer.Serialize(_responseData).ToString(), null)) + return sdt; + else + sdt.FromJSonString("{" + varName + ":" + JsonSerializer.Serialize(_responseData) + "}", null); #else - sdt.FromJSonString("{" + varName + ":" + JSONHelper.Serialize(_responseData) + "}", null); + if (sdt.FromJSonString(JSONHelper.Serialize(_responseData).ToString(), null)) + return sdt; + else + sdt.FromJSonString("{" + varName + ":" + JSONHelper.Serialize(_responseData) + "}", null); #endif } return sdt;