json

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name          = "go_json"
	Marshal       = json.Marshal
	Unmarshal     = json.Unmarshal
	MarshalIndent = json.MarshalIndent
	NewDecoder    = json.NewDecoder
	NewEncoder    = json.NewEncoder
)

Functions

func MustJSON

func MustJSON(v any) []byte

MustJSON 转 json 返回 []byte

func MustJSONIndent

func MustJSONIndent(v any) []byte

MustJSONIndent 转 json 返回 []byte

func MustJSONIndentString

func MustJSONIndentString(v any) string

MustJSONIndentString 转 json 返回 string

func MustJSONString

func MustJSONString(v any) string

MustJSONString 转 json 返回 string

Types

type RawMessage

type RawMessage []byte

func (RawMessage) Copy

func (m RawMessage) Copy() []byte

Copy returns a copy of m.

func (RawMessage) MarshalJSON

func (m RawMessage) MarshalJSON() ([]byte, error)

MarshalJSON returns m as the JSON encoding of m.

func (*RawMessage) UnmarshalJSON

func (m *RawMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *m to a copy of data.

Jump to

Keyboard shortcuts

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