Skip to content

Commit

Permalink
- Fix for reading output parameter unwrapped SDT (#769)
Browse files Browse the repository at this point in the history
* - Fix for reading output parameter unwrapped SDT

* - Fix al commit anterior para el caso que no viene el SDT "wrapped"

* - Updated branch with suggested changes.
  • Loading branch information
AlejandroP authored Feb 22, 2023
1 parent c670617 commit 2edb3eb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dotnet/src/dotnetframework/GxClasses/Helpers/GXRestAPIClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2edb3eb

Please sign in to comment.