parse

package
v0.0.0-...-fb6054f Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxDepth = 1000

Variables

This section is empty.

Functions

func ParseFn

func ParseFn(b []byte, fn func(*Node) error) error

Types

type Node

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

func Parse

func Parse(b []byte) (*Node, error)

func (*Node) Array

func (node *Node) Array() ([]*Node, error)

func (*Node) Bool

func (node *Node) Bool() (bool, error)

func (*Node) Err

func (node *Node) Err() error

func (*Node) Float64

func (node *Node) Float64() (float64, error)

func (*Node) Get

func (node *Node) Get(key string) *Node

func (*Node) Int

func (node *Node) Int() (int, error)

func (*Node) Int64

func (node *Node) Int64() (int64, error)

func (*Node) ReleaseParseCache

func (node *Node) ReleaseParseCache()

func (*Node) SetErr

func (node *Node) SetErr(err error)

func (*Node) String

func (node *Node) String() (string, error)

func (*Node) Type

func (node *Node) Type() Type

func (*Node) Uint

func (node *Node) Uint() (uint, error)

func (*Node) Uint64

func (node *Node) Uint64() (uint64, error)

type Object

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

func (*Object) Get

func (o *Object) Get(key string) *Value

type Parser

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

func (*Parser) Parse

func (p *Parser) Parse(b []byte) (*Value, error)

type ParserPool

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

func (*ParserPool) Get

func (pp *ParserPool) Get() *Parser

func (*ParserPool) Put

func (pp *ParserPool) Put(p *Parser)

type Type

type Type int

Type represents JSON type.

const (
	// TypeNull is JSON null.
	TypeNull Type = 0

	// TypeObject is JSON object type.
	TypeObject Type = 1

	// TypeArray is JSON array type.
	TypeArray Type = 2

	// TypeString is JSON string type.
	TypeString Type = 3

	// TypeNumber is JSON number type.
	TypeNumber Type = 4

	// TypeTrue is JSON true.
	TypeTrue Type = 5

	// TypeFalse is JSON false.
	TypeFalse Type = 6

	TypeNil Type = 8
)

func (Type) String

func (t Type) String() string

type Value

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

func (*Value) Array

func (v *Value) Array() ([]*Value, error)

func (*Value) Data

func (v *Value) Data() (int32, int32, error)

func (*Value) Get

func (v *Value) Get(key string) (*Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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