fjson

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStructToJson   = errors.New("parse struct to json string error")
	ErrStringToStruct = errors.New("parse json string to struct error")
)

Functions

func Get

func Get(data []byte, path ...any) jsoniter.Any

func Marshal

func Marshal(v any) ([]byte, error)

func MarshalIndent

func MarshalIndent(v any, prefix, indent string) ([]byte, error)

func MarshalToString

func MarshalToString(v any) (string, error)

func NewDecoder

func NewDecoder(reader io.Reader) *jsoniter.Decoder

func NewEncoder

func NewEncoder(writer io.Writer) *jsoniter.Encoder

func Unmarshal

func Unmarshal(data []byte, v any) error

func UnmarshalFromString

func UnmarshalFromString(data string, v any) error

func Valid

func Valid(data []byte) bool

func ValidFromString

func ValidFromString(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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