readDouble

Reads a single double value.

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

Examples

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

Meta