Extracted at 2014-06-26.
pike.ida.liu.se
[Top]
Tools
Tools.JSON
Tools.JSON.JSONObject

Method Tools.JSON.JSONObject()->optBoolean()


Method optBoolean

int(0..1) optBoolean(string key, void|int(0..1) defaultValue)

Description

Get an optional value associated with a key. It returns false if there is no such key, or if the value is not Boolean.TRUE or the String "true".

Parameter key

A key string.

Parameter defaultValue

The preferred return value if conversion fails

Returns

bool value object