Function readBool
Reads a single double value.
bool readBool(R)
(
ref R nodes
)
if (isJSONParserNodeInputRange!R);
Parameters
| Name | Description |
|---|---|
| nodes | An input range of JSON parser nodes |
Throws
Throws a JSONException is the node range is empty or nodes is not a boolean.
Example
auto j = parseJSONStream(`true`);
bool value = j .readBool;
assert(value == true);
assert(j .empty);