Function readString

Reads a single double value.

string readString(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 string.

Example

auto j = parseJSONStream(`"foo"`);
string value = j.readString;
assert(value == "foo");
assert(j.empty);