Table of Contents

JBooleanOrDefault Method

Returns the Boolean value of a JSON element, or False if the element is nil.

Syntax

Unit: Bcl.Json.Classes

function JBooleanOrDefault(Element: TJElement): Boolean;

Parameters

<-> Parameter Type Description
Element TJElement The JSON element to read. May be nil.

Returns

The Boolean value from Element.AsBoolean, or False if Element is nil.