JsonUtils.asBool Function

Get a value as a boolean.

asBool(json: any, defaultVal: booleanfalse): boolean

@returns the value of json as a boolean, or default value

Parameter Type Description
json any the input JSON object
defaultVal boolean default value if json cannot be converted to boolean

Returns - boolean

the value of json as a boolean, or default value

Defined in

Last Updated: 14 November, 2024