An input range of JSON parser nodes
Name of the key to find
Params:
An input range of JSON parser nodes
true is returned if and only if the specified key has been found.
auto j = parseJSONStream(q{ { "foo": 2, "bar": 3, "baz": false, "qux": "str" } }); j.skipToKey("bar"); double v1 = j.readDouble; assert(v1 == 3); j.skipToKey("qux"); string v2 = j.readString; assert(v2 == "str"); assert(j.front.kind == JSONParserNodeKind.objectEnd); j.popFront(); assert(j.empty);
Skips all entries in an object until a certain key is reached.
The node range must either point to the start of an object (JSONParserNodeKind.objectStart), or to a key within an object (JSONParserNodeKind.key).