Documentation
¶
Overview ¶
Package token TODO
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
Token is a struct representing a JSON token - It holds information like its Type and Literal, as well as Start, End, and Line fields. Line is used for better error handling, while Start and End are used to return objects/arrays from querys.
type Type ¶
type Type string
Type is a type alias for a string
const ( // Token/character we don't know about Illegal Type = "ILLEGAL" // End of file EOF Type = "EOF" // Literals String Type = "STRING" Number Type = "NUMBER" // The six structural tokens LeftBrace Type = "{" RightBrace Type = "}" LeftBracket Type = "[" RightBracket Type = "]" Comma Type = "," Colon Type = ":" // Values True Type = "TRUE" False Type = "FALSE" Null Type = "NULL" )
All the different tokens for supporting JSON
func LookupIdentifier ¶
LookupIdentifier checks our validJSONIdentifiers map for the scanned identifier. If it finds one, the identifier's token type is returned. If not found, an error is returned
Click to show internal directories.
Click to hide internal directories.