Class JsonLexer

A JSON lexer that allows tokens to be processed as they are read.

class JsonLexer(IRangeT)
  
if (isInputRange!IRangeT && isSomeChar!(ElementType!IRangeT));

Methods

NameDescription
advance () Read the next token from the input data and return it.
boolValue () Returns the boolean value of the most recently read token.
cur () Returns the most recently read token.
doAdvance () Reads input characters, updates the lexer state, and returns the next [Token].
doubleValue () Returns the double value of the most recently read token.
expectToken (tk) Test that a token type is present, and throw an error if not.
longValue () Returns the long value of the most recently read token.
next () Reads the input range for the next character (skipping whitespace).
peek () View the next Token without consuming it.
tryLiteral (exp, n, tk) Attempts to process a literal string of expected output, such as "null" or "false".
tryNumber (ch) Consumes characters in order to identify a number.
tryString ()