json

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MarshalIndent = stdjson.MarshalIndent
	Indent        = stdjson.Indent
	NewEncoder    = stdjson.NewEncoder
	Valid         = stdjson.Valid
)
View Source
var (
	Marshal    = json.Marshal
	Unmarshal  = json.Unmarshal
	NewDecoder = json.NewDecoder
)

Functions

func MustMarshal

func MustMarshal(v any) []byte

MustMarshal is similar to Marshal, but panics if found error.

func MustMarshalIndent

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

MustMarshalIndent is similar to MarshalIndent, but panics if found error.

func MustUnmarshal

func MustUnmarshal(data []byte, v any)

MustUnmarshal is similar to Unmarshal, but panics if found error.

func ShouldMarshal

func ShouldMarshal(v any) []byte

ShouldMarshal is similar to Marshal, but never return error.

func ShouldMarshalIndent

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

ShouldMarshalIndent is similar to MarshalIndent, but never return error.

func ShouldUnmarshal

func ShouldUnmarshal(data []byte, v any)

ShouldUnmarshal is similar to Unmarshal, but never return error.

Types

type RawMessage

type RawMessage = stdjson.RawMessage

Jump to

Keyboard shortcuts

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