json

package
v0.0.0-...-c879681 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenOpenObject     = '{'
	TokenCloseObject    = '}'
	TokenOpenArray      = '['
	TokenCloseArray     = ']'
	TokenComma          = ','
	TokenColon          = ':'
	TokenDoubleQuote    = '"'
	TokenBackslash      = '\\'
	TokenSlash          = '/'
	TokenAsterisk       = '*'
	TokenNewline        = '\n'
	TokenSpace          = ' '
	TokenCarriageReturn = '\r'
	TokenTab            = '\t'
	TokenFormFeed       = '\f'
	TokenBackspace      = '\b'
	TokenEof            = 4
)
View Source
const ExpectedEofError = "Expected end of file at line %d, column %d"
View Source
const ExpectedTokenError = "Expected '%c' at line %d, column %d"
View Source
const UnexpectedEofError = "Unexpected end of file at line %d, column %d"
View Source
const UnexpectedTokenError = "Unexpected token '%c' (%[1]U) at line %d, column %d"
View Source
const UnexpectedTokenExpectedError = "Unexpected token '%c' (%[1]U), expected '%c' (%[2]U) at line %d, column %d"

Variables

View Source
var CacheDir string

CacheDir is a directory used for cache

Functions

func ConvertToUTF8

func ConvertToUTF8(str []byte) ([]byte, error)

func MarshalJSONC

func MarshalJSONC(object interface{}, pretty bool) ([]rune, error)

func UnmarshallJSONC

func UnmarshallJSONC(str []byte) (interface{}, error)

Types

type StringReader

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

func NewStringReader

func NewStringReader(str []byte) *StringReader

func (*StringReader) Peek

func (sr *StringReader) Peek() rune

func (*StringReader) Read

func (sr *StringReader) Read() rune

Jump to

Keyboard shortcuts

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