Import the Token enum into this namespace
TokenClass enum "Other" is for tokens that stand for themselves
Returns the nesting level difference caused by the current token.
Iterates over the json string looking for the named element and returning the value of the following element.
Iterates over the json string looking for the named element and returning the value of the following element if it is a boolean. If the value is not boolean the search continues.
Iterates over the json string looking for the named element and returning the value of the following element if it is a number. If the value is not a number the search continues.
Iterates over the json string looking for the named object and halting iteration if it is found.
Iterates over the json string looking for the named element and returning the value of the following element if it is a string. If the value is not a string the search continues.
Steps to the next token in the current JSON content.
'foreach' iteration over type/value pairs in the current content
'foreach' iteration over type/name/value triples in the current content.
Resets the instance and sets the input content (convenience wrapper for super.reset()).
Skips the current member so that the next member is reached by a next() call or in the next 'foreach' iteration cycle. That is, - if the current token denotes an object or array beginning, to the corresponding object/array end token, - if the current token is a name, steps over the name, - if the current member is a value, does nothing.
Token nesting difference values
Token to TokenClass association
Token type descriptions
alias JsonParserIter!(true) JsonParserIterWithNan; alias JsonParserIter!(false) JsonParserIterNoNan; bool found; istring json = `{ "object": { "cost": 12.34, "sub": { "cost": 42 } } }`; scope parser = new JsonParserIterNoNan(); parser.reset(json); auto val = parser.nextNamed("cost", found); test(found, "Boolean flag should be set to true"); test!("==")(val, "12.34"[]); found = false; auto uval = parser.nextNamedNumber!(uint)("cost", found); test(found, "Boolean flag should be set to true"); test!("==")(uval, 42);