Documentation
¶
Index ¶
- Constants
- type Lexer
- func (lx *Lexer) ExpectBeginArray() bool
- func (lx *Lexer) ExpectBeginObject() bool
- func (lx *Lexer) ExpectBool() (bool, bool)
- func (lx *Lexer) ExpectEOF() bool
- func (lx *Lexer) ExpectEndArray() bool
- func (lx *Lexer) ExpectEndObject() bool
- func (lx *Lexer) ExpectNameSeparator() bool
- func (lx *Lexer) ExpectNull() bool
- func (lx *Lexer) ExpectNumberBytes() ([]byte, bool)
- func (lx *Lexer) ExpectString() (string, bool)
- func (lx *Lexer) ExpectUint64() (uint64, bool)
- func (lx *Lexer) ExpectValueSeparator() bool
- func (lx *Lexer) NextTokenType() TokenType
- type Parser
- func (pa *Parser) Parse() (any, error)
- func (pa *Parser) ParseArray() ([]any, error)
- func (pa *Parser) ParseBool() (bool, error)
- func (pa *Parser) ParseFloat64() (float64, error)
- func (pa *Parser) ParseNull() (any, error)
- func (pa *Parser) ParseObject() (map[string]any, error)
- func (pa *Parser) ParseRat() (*big.Rat, error)
- func (pa *Parser) ParseSampleObject1() (SampleObject1, error)
- func (pa *Parser) ParseSampleObject2() (SampleObject2, error)
- func (pa *Parser) ParseSampleObject2Array() ([]SampleObject2, error)
- func (pa *Parser) ParseString() (string, error)
- func (pa *Parser) ParseValue() (any, error)
- type SampleObject1
- type SampleObject2
- type Scanner
- func (sc *Scanner) BufferedLen() int
- func (sc *Scanner) CountASCII() int
- func (sc *Scanner) CountASCIIZero() int
- func (sc *Scanner) CountDigit() int
- func (sc *Scanner) CountHex() int
- func (sc *Scanner) CountMultiByteUTF8() int
- func (sc *Scanner) CountUnescapedASCII() int
- func (sc *Scanner) CountWhiteSpace() int
- func (sc *Scanner) Err() error
- func (sc *Scanner) Load() bool
- func (sc *Scanner) Peek() byte
- func (sc *Scanner) PeekN(n int) []byte
- func (sc *Scanner) Skip(n int)
- type TokenType
Constants ¶
View Source
const ( ScannerBufSize = 1024 ScannerBufRetainSize = 64 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
func (*Lexer) ExpectBeginArray ¶
func (*Lexer) ExpectBeginObject ¶
func (*Lexer) ExpectBool ¶
func (*Lexer) ExpectEndArray ¶
func (*Lexer) ExpectEndObject ¶
func (*Lexer) ExpectNameSeparator ¶
func (*Lexer) ExpectNull ¶
func (*Lexer) ExpectNumberBytes ¶
func (*Lexer) ExpectString ¶
func (*Lexer) ExpectUint64 ¶
func (*Lexer) ExpectValueSeparator ¶
func (*Lexer) NextTokenType ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseArray ¶
func (*Parser) ParseFloat64 ¶
func (*Parser) ParseSampleObject1 ¶
func (pa *Parser) ParseSampleObject1() (SampleObject1, error)
func (*Parser) ParseSampleObject2 ¶
func (pa *Parser) ParseSampleObject2() (SampleObject2, error)
func (*Parser) ParseSampleObject2Array ¶
func (pa *Parser) ParseSampleObject2Array() ([]SampleObject2, error)
func (*Parser) ParseString ¶
func (*Parser) ParseValue ¶
type SampleObject1 ¶
type SampleObject1 struct { Boolean bool `json:"boolean"` Float64 float64 `json:"float64"` String string `json:"string"` Object map[string]any `json:"object"` Array []any `json:"array"` Any any `json:"any"` Object2 SampleObject2 `json:"object2"` Object2Array []SampleObject2 `json:"object2_array"` }
type SampleObject2 ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func (*Scanner) BufferedLen ¶
func (*Scanner) CountASCII ¶
func (*Scanner) CountASCIIZero ¶
func (*Scanner) CountDigit ¶
func (*Scanner) CountMultiByteUTF8 ¶
func (*Scanner) CountUnescapedASCII ¶
func (*Scanner) CountWhiteSpace ¶
Click to show internal directories.
Click to hide internal directories.