Function readBool

Reads a single double value.

bool readBool(R) (
  ref R nodes
)
if (isJSONParserNodeInputRange!R);

Parameters

NameDescription
nodes An input range of JSON parser nodes

Throws

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

Example

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