Function readDouble

Reads a single double value.

double readDouble(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 number.

Example

auto j = parseJSONStream(`1.0`);
double value = j.readDouble;
assert(value == 1.0);
assert(j.empty);