json

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: Apache-2.0 Imports: 4 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은 입력 바이트를 복사해 저장합니다.

type SyntaxError

type SyntaxError = decoder.SyntaxError

sonic은 전용 오류 타입을 반환하므로 별칭으로 노출해 표준 라이브러리 호환 지점을 유지한다.

type UnmarshalTypeError

type UnmarshalTypeError = decoder.MismatchTypeError

Jump to

Keyboard shortcuts

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