readBool

Reads a single double value.

bool
readBool
(
R
)
(
ref R nodes
)

Parameters

nodes R

An input range of JSON parser nodes

Throws

Throws a JSONException is the node range is empty or nodes.front is not a boolean.

Examples

auto j = parseJSONStream(`true`);
bool value = j.readBool;
assert(value == true);
assert(j.empty);

Meta