mocjson

package module
v0.0.0-...-0cf6f79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 10 Imported by: 0

README

mocjson-go

Moctane JSON serializer/deserializer for golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(r io.Reader) Lexer

func (*Lexer) ExpectBeginArray

func (lx *Lexer) ExpectBeginArray() bool

func (*Lexer) ExpectBeginObject

func (lx *Lexer) ExpectBeginObject() bool

func (*Lexer) ExpectBool

func (lx *Lexer) ExpectBool() (bool, bool)

func (*Lexer) ExpectEOF

func (lx *Lexer) ExpectEOF() bool

func (*Lexer) ExpectEndArray

func (lx *Lexer) ExpectEndArray() bool

func (*Lexer) ExpectEndObject

func (lx *Lexer) ExpectEndObject() bool

func (*Lexer) ExpectFloat64

func (lx *Lexer) ExpectFloat64() (float64, bool)

func (*Lexer) ExpectNameSeparator

func (lx *Lexer) ExpectNameSeparator() bool

func (*Lexer) ExpectNull

func (lx *Lexer) ExpectNull() bool

func (*Lexer) ExpectString

func (lx *Lexer) ExpectString() (string, bool)

func (*Lexer) ExpectUint64

func (lx *Lexer) ExpectUint64() (uint64, bool)

func (*Lexer) ExpectValueSeparator

func (lx *Lexer) ExpectValueSeparator() bool

func (*Lexer) NextTokenType

func (lx *Lexer) NextTokenType() TokenType

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(r io.Reader) Parser

func (*Parser) Parse

func (pa *Parser) Parse() (any, error)

func (*Parser) ParseArray

func (pa *Parser) ParseArray() ([]any, error)

func (*Parser) ParseBool

func (pa *Parser) ParseBool() (bool, error)

func (*Parser) ParseNull

func (pa *Parser) ParseNull() (any, error)

func (*Parser) ParseNumber

func (pa *Parser) ParseNumber() (float64, error)

func (*Parser) ParseObject

func (pa *Parser) ParseObject() (map[string]any, error)

func (*Parser) ParseString

func (pa *Parser) ParseString() (string, error)

func (*Parser) ParseValue

func (pa *Parser) ParseValue() (any, error)

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(r io.Reader) Scanner

func (*Scanner) ASCIIZeroLen

func (sc *Scanner) ASCIIZeroLen() int

func (*Scanner) Bytes

func (sc *Scanner) Bytes(n int) []byte

func (*Scanner) DigitLen

func (sc *Scanner) DigitLen() int

func (*Scanner) Err

func (sc *Scanner) Err() error

func (*Scanner) HexLen

func (sc *Scanner) HexLen() int

func (*Scanner) Load

func (sc *Scanner) Load() bool

func (*Scanner) LoadedLen

func (sc *Scanner) LoadedLen() int

func (*Scanner) MultiByteUTF8Len

func (sc *Scanner) MultiByteUTF8Len() int

func (*Scanner) Peek

func (sc *Scanner) Peek() byte

func (*Scanner) Skip

func (sc *Scanner) Skip(n int)

func (*Scanner) UnescapedASCIILen

func (sc *Scanner) UnescapedASCIILen() int

func (*Scanner) WhiteSpaceLen

func (sc *Scanner) WhiteSpaceLen() int

type TokenType

type TokenType int
const (
	TokenTypeInvalid TokenType = iota
	TokenTypeEOF
	TokenTypeBeginArray
	TokenTypeEndArray
	TokenTypeBeginObject
	TokenTypeEndObject
	TokenTypeNameSeparator
	TokenTypeValueSeparator
	TokenTypeNull
	TokenTypeBool
	TokenTypeNumber
	TokenTypeString
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL