json

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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 = json.RawMessage

Jump to

Keyboard shortcuts

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