json

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 5 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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