Help us shape the future of Go! Take the 2026 Go Developer Survey

json

package
v1.47.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v any) ([]byte, error)

func MarshalIndent

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

func NewDecoder

func NewDecoder(r io.Reader) sonic.Decoder

func Unmarshal

func Unmarshal(data []byte, v any) error

func Valid

func Valid(data []byte) bool

Types

type Encoder

type Encoder = sonic.Encoder

func NewEncoder

func NewEncoder(w io.Writer) Encoder

type RawMessage

type RawMessage []byte

RawMessage는 지연 디코딩을 위한 raw JSON 바이트를 보관합니다.

func (RawMessage) MarshalJSON

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

MarshalJSON은 raw payload를 그대로 반환합니다.

func (*RawMessage) UnmarshalJSON

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

UnmarshalJSON은 입력 바이트를 복사해 저장합니다.

Jump to

Keyboard shortcuts

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