Struct JSONToken

A low-level JSON token as returned by JSONLexer.

struct JSONToken(S) ;

Constructors

NameDescription
this Constructs a token from a primitive data value
this Constructs a token with a specific kind.

Fields

NameTypeDescription
location LocationThe location of the token in the input.

Properties

NameTypeDescription
boolean[get, set] boolGets/sets the boolean value of the token.
kind[get, set] KindGets/sets the kind of the represented token.
number[get, set] JSONNumberGets/sets the numeric value of the token.
string[get, set] const(JSONString!String)Gets/sets the string value of the token.

Methods

NameDescription
opEquals Enables equality comparisons.
toHash Enables usage of JSONToken as an associative array key.
toString Converts the token to a string representation.