json

package
v0.0.0-...-7f75908 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Json = jsoniter.Config{
	EscapeHTML:             false,
	UseNumber:              true,
	SortMapKeys:            true,
	ValidateJsonRawMessage: true,
}.Froze()

Functions

func Exists

func Exists(data []byte, keys ...string) bool

func GetBool

func GetBool(data []byte, keys ...string) bool

func GetFloat64

func GetFloat64(data []byte, keys ...string) float64

func GetInt

func GetInt(data []byte, keys ...string) int

func GetString

func GetString(data []byte, keys ...string) string

func Marshal

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

func MarshalToString

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

func Parse

func Parse(s string) (*fastjson.Value, error)

func ParseBytes

func ParseBytes(b []byte) (*fastjson.Value, error)

func Unmarshal

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

func Validate

func Validate(s string) error

func ValidateBytes

func ValidateBytes(b []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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