getBool


Description:

public static bool getBool (JsonValue root, string path, bool fallback = false)

Returns a boolean value at the given path with a fallback.

Example:

    bool active = Json.getBool (root, "$.active", false);

Parameters:

root

root value.

path

JSON path expression.

fallback

value to return if path not found or type mismatch.

Returns:

boolean value or fallback.