djson

package module
v0.0.0-...-b9103d9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicJSON

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

func FromFile

func FromFile(filepath string) (r *DynamicJSON, err error)

func FromFolder

func FromFolder(path string) ([]*DynamicJSON, error)

func FromResponse

func FromResponse(resp *http.Response, err0 error) (response *DynamicJSON, err error)

func FromResponse200

func FromResponse200(resp *http.Response, err0 error) (response *DynamicJSON, err error)

func NewArray

func NewArray() *DynamicJSON

func NewMap

func NewMap() *DynamicJSON

func Parse

func Parse(data []byte) (*DynamicJSON, error)

func (*DynamicJSON) Append

func (self *DynamicJSON) Append(v any)

func (*DynamicJSON) Array

func (self *DynamicJSON) Array(name string) *DynamicJSON

func (*DynamicJSON) ArrayI

func (self *DynamicJSON) ArrayI(i int) *DynamicJSON

func (*DynamicJSON) Clear

func (self *DynamicJSON) Clear()

func (*DynamicJSON) Clone

func (self *DynamicJSON) Clone() *DynamicJSON

func (*DynamicJSON) Delete

func (self *DynamicJSON) Delete(path string) error

func (*DynamicJSON) Each

func (self *DynamicJSON) Each(path string) iter.Seq[*DynamicJSON]

func (*DynamicJSON) EachPair

func (self *DynamicJSON) EachPair(path string) iter.Seq2[string, any]

func (*DynamicJSON) Fetch

func (self *DynamicJSON) Fetch(path string) (any, bool)

func (*DynamicJSON) Freeze

func (self *DynamicJSON) Freeze()

func (*DynamicJSON) Get

func (self *DynamicJSON) Get(path string) any

func (*DynamicJSON) GetAnySlice

func (self *DynamicJSON) GetAnySlice(path string) []any

func (*DynamicJSON) GetBool

func (self *DynamicJSON) GetBool(path string, defaultValue bool) bool

func (*DynamicJSON) GetFloat

func (self *DynamicJSON) GetFloat(path string, defaultValue float64) float64

func (*DynamicJSON) GetI

func (self *DynamicJSON) GetI(i int) any

func (*DynamicJSON) GetInt

func (self *DynamicJSON) GetInt(path string, defaultValue int) int

func (*DynamicJSON) GetIntsSlice

func (self *DynamicJSON) GetIntsSlice(path string) []int

func (*DynamicJSON) GetSlice

func (self *DynamicJSON) GetSlice(path string) []*DynamicJSON

func (*DynamicJSON) GetStr

func (self *DynamicJSON) GetStr(path string) string

func (*DynamicJSON) GetString

func (self *DynamicJSON) GetString(path string, defaultValue string) string

func (*DynamicJSON) GetStringsSlice

func (self *DynamicJSON) GetStringsSlice(path string) []string

func (*DynamicJSON) GetTime

func (self *DynamicJSON) GetTime(path string) time.Time

func (*DynamicJSON) Has

func (self *DynamicJSON) Has(path string) bool

func (*DynamicJSON) IsArray

func (self *DynamicJSON) IsArray() bool

func (*DynamicJSON) IsEqual

func (self *DynamicJSON) IsEqual(o *DynamicJSON) bool

func (*DynamicJSON) IsEqualAsString

func (self *DynamicJSON) IsEqualAsString(o *DynamicJSON) bool

func (*DynamicJSON) IsEqualCheck

func (self *DynamicJSON) IsEqualCheck(o *DynamicJSON) bool

func (*DynamicJSON) IsFrozen

func (self *DynamicJSON) IsFrozen() bool

func (*DynamicJSON) Iterate

func (self *DynamicJSON) Iterate(cb func(key string, value interface{}) bool)

func (*DynamicJSON) JSON

func (self *DynamicJSON) JSON() []byte

func (*DynamicJSON) JSONLine

func (self *DynamicJSON) JSONLine() []byte

func (*DynamicJSON) Keys

func (self *DynamicJSON) Keys() []string

func (*DynamicJSON) Len

func (self *DynamicJSON) Len() int

func (*DynamicJSON) Map

func (self *DynamicJSON) Map(name string) *DynamicJSON

func (*DynamicJSON) MapI

func (self *DynamicJSON) MapI(i int) *DynamicJSON

func (*DynamicJSON) Nested

func (self *DynamicJSON) Nested(path string) *DynamicJSON

func (*DynamicJSON) NestedI

func (self *DynamicJSON) NestedI(i int) *DynamicJSON

func (*DynamicJSON) Set

func (self *DynamicJSON) Set(path string, value interface{})

func (*DynamicJSON) SetI

func (self *DynamicJSON) SetI(i int, value interface{}) error

func (*DynamicJSON) Visit

func (self *DynamicJSON) Visit(cb func(path string, value interface{}))

self must not be changed

type StrMap

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

func NewStrMap

func NewStrMap() *StrMap

func (*StrMap) Delete

func (self *StrMap) Delete(key string)

func (*StrMap) Get

func (self *StrMap) Get(key string) (interface{}, bool)

func (*StrMap) Has

func (self *StrMap) Has(key string) bool

func (*StrMap) Iterate

func (self *StrMap) Iterate(cb func(key string, value interface{}) bool)

func (*StrMap) Len

func (self *StrMap) Len() int

func (*StrMap) Set

func (self *StrMap) Set(key string, value interface{})

Jump to

Keyboard shortcuts

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