Skip to main content
Version: SDK-5.11.6

HasReturnValue

public bool HasReturnValue();
public bool HasReturnValue(out LitJson.JsonData jsonData, bool isFlatten);

Parameters

ValueTypeDescriptionDefault
jsonDatajsonData(Optional) If returnValue exists, it assigns returnValue in a JsonData format to the passed argument.-
isFlattenbool(Optional) Whether the data type that exists in returnValue is removedfalse

Description

Checks whether returnValue exists in the BackendReturnObject object returned as a result of the request made to the server.
returnValue only exists if the request was successful.

Example

var bro = Backend.BMember.GetUserInfo();

LitJson.JsonData jsonData = null;
if(bro.HasReturnValue()) {
jsonData = bro.GetReturnValuetoJSON();
}

if(bro.HasReturnValue(out jsonData)) {
// Post-process
});
}

Return casess

When the returnValue exists and isFlatten is false
return : true
jsonData : GetReturnValuetoJSON

When the returnValue exists and isFlatten is true
return : true
jsonData : GetFlattenJSON

When the returnValue does not exist
return : false
jsonData : null