Skip to main content
Version: 5.9.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)) {
// 이후 처리
}

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