xjson

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 7 Imported by: 0

README

xjson

golang json wrapper.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Xjson

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

func New

func New() *Xjson

func NewFromFile

func NewFromFile(file string) (*Xjson, error)

func NewFromString

func NewFromString(jstr string) (*Xjson, error)

func (*Xjson) Assign

func (j *Xjson) Assign(str string)

func (*Xjson) CompactString

func (j *Xjson) CompactString() string

func (*Xjson) Delete

func (j *Xjson) Delete(path string)

func (*Xjson) Exist

func (j *Xjson) Exist(path string) bool

func (*Xjson) ForEach added in v1.0.1

func (j *Xjson) ForEach(path string,
	cb func(key string, value string) bool)

when array, key is "0","1",...

func (*Xjson) GetArraySize

func (j *Xjson) GetArraySize(path string) int

func (*Xjson) GetBool

func (j *Xjson) GetBool(path string) bool

func (*Xjson) GetInt

func (j *Xjson) GetInt(path string) int

func (*Xjson) GetString

func (j *Xjson) GetString(path string) string

func (*Xjson) IndentString

func (j *Xjson) IndentString() string

func (*Xjson) Reset

func (j *Xjson) Reset()

func (*Xjson) Set

func (j *Xjson) Set(path string, val any)

func (*Xjson) String

func (j *Xjson) String() string

func (*Xjson) Unmarshal

func (j *Xjson) Unmarshal(path string, val any) error

Jump to

Keyboard shortcuts

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