Skip to content

TJSONToken

JSON token types

Declaration

Source position: jsonscanner.pp line 38

type
  TJSONToken = (tkEOF,tkWhitespace,tkString,tkNumber,tkTrue,tkFalse,
              tkNull,tkComma,tkColon,tkCurlyBraceOpen,tkCurlyBraceClose,
              tkSquaredBraceOpen,tkSquaredBraceClose,tkIdentifier,
              tkComment,tkUnknown)

Values

Value Description
tkEOF End of file token
tkWhitespace Whitespace token
tkString String literal token
tkNumber Numeric value token
tkTrue Boolean true token
tkFalse Boolean false token
tkNull Null value token
tkComma Comma separator token
tkColon Colon separator token
tkCurlyBraceOpen Opening curly brace token
tkCurlyBraceClose Closing curly brace token
tkSquaredBraceOpen Opening square bracket token
tkSquaredBraceClose Closing square bracket token
tkIdentifier Identifier token
tkComment Comment token
tkUnknown Unknown token

Description

Enumeration of all possible token types that can be encountered during JSON scanning. Each token represents a distinct syntactic element in JSON syntax.

tkEOF
End of input stream reached
tkWhitespace
Whitespace characters (spaces, tabs)
tkString
String literal enclosed in quotes
tkNumber
Numeric value (integer or floating-point)
tkTrue
Boolean True literal
tkFalse
Boolean False literal
tkNull
Null literal value
tkComma
Comma separator character
tkColon
Colon separator character
tkCurlyBraceOpen
Opening curly brace for objects
tkCurlyBraceClose
Closing curly brace for objects
tkSquaredBraceOpen
Opening square bracket for arrays
tkSquaredBraceClose
Closing square bracket for arrays
tkIdentifier
Identifier (in non-strict mode)
tkComment
Comment content (when comments are enabled)
tkUnknown
Unrecognized token

See also

Name Description
TJSONScanner JSON lexical scanner
TokenInfos Token type descriptions