jsonx

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 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 Unmarshal

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

func UnmarshalWithOptions

func UnmarshalWithOptions(data []byte, out any, options DecodeOptions) error

Types

type DecodeOptions

type DecodeOptions struct {
	RejectUnknownMembers bool
}

type RawMessage

type RawMessage []byte

RawMessage stores a raw encoded JSON value. It is equivalent to encoding/json.RawMessage behavior.

func (RawMessage) MarshalJSON

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

func (*RawMessage) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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