pjson

package
v0.0.0-...-b735ce1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v interface{}) ([]byte, error)

func MarshalIndent

func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)

func MarshalToString

func MarshalToString(v interface{}) (string, error)

func RegisterFuzzyDecoders

func RegisterFuzzyDecoders()

RegisterFuzzyDecoders 字符串转换/空数组兼容

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

func UnmarshalFromString

func UnmarshalFromString(str string, v interface{}) error

Types

type JsonDocument

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

func NewJsonDocument

func NewJsonDocument(json string) *JsonDocument

func (*JsonDocument) GetJson

func (jd *JsonDocument) GetJson() string

func (*JsonDocument) GetPathBool

func (jd *JsonDocument) GetPathBool(path string) bool

func (*JsonDocument) GetPathInt

func (jd *JsonDocument) GetPathInt(path string) int64

func (*JsonDocument) GetPathString

func (jd *JsonDocument) GetPathString(path string) string

func (*JsonDocument) SetJson

func (jd *JsonDocument) SetJson(json string)

func (*JsonDocument) SetPathValue

func (jd *JsonDocument) SetPathValue(path string, value interface{}) (string, error)

Jump to

Keyboard shortcuts

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