[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'fpjson' (#fcl)

TJSONData.AsBoolean

Access the raw JSON value as a boolean

Declaration

Source position: fpjson.pp line 133

public property TJSONData.AsBoolean : Boolean
  read GetAsBoolean
  write SetAsBoolean;

Description

AsBoolean allows access to the raw value as a boolean value. When reading, it attempts to convert the native value of the data to a boolean value. When writing, it attempts to transform the boolean value to a native value. For numbers this means that nonzero numbers result in True, a zero resutls in False. If either conversion fails, an EConvertError exception is raised.

For TJSONBoolean this will return the native value.

For complex values, reading or writing this property will always result in an EConvertError exception.

See also

AsFloat

Value

AsInt64

AsString

AsInteger

IsNull

AsJSON


Documentation generated on: Sep 28 2017