File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
dotnet/src/dotnetframework/GxClasses/Helpers Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -247,15 +247,15 @@ public string GetJsonStr(string varName)
247247 public T GetBodySdt < T > ( string varName ) where T : GxUserType , new ( )
248248 {
249249 T sdt = new T ( ) ;
250- if ( _responseData . ContainsKey ( varName . ToLower ( ) ) )
250+ if ( _responseData . ContainsKey ( varName . ToLower ( ) ) && _responseData . Count == 1 ) //wrapped sdt
251251 {
252252 sdt . FromJSonString ( _responseData [ varName . ToLower ( ) ] . ToString ( ) , null ) ;
253253 }
254- else if ( _responseData . Count == 1 && _responseData . ContainsKey ( String . Empty ) )
254+ else if ( _responseData . Count == 1 && _responseData . ContainsKey ( String . Empty ) ) // unwrapped
255255 {
256256 sdt . FromJSonString ( _responseData [ String . Empty ] . ToString ( ) , null ) ;
257- }
258- else if ( _responseData . Count >= 1 && ! _responseData . ContainsKey ( varName . ToLower ( ) ) )
257+ }
258+ else if ( _responseData . Count >= 1 ) // can contain the same key (recursive unwrapped )
259259 {
260260
261261#if NETCORE
You can’t perform that action at this time.
0 commit comments