json

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "json"

Name 是 JSON 编解码器注册的名称。

Variables

View Source
var (

	// MarshalOptions 可配置的 JSON 序列化选项。
	MarshalOptions = protojson.MarshalOptions{
		EmitUnpopulated: true,
	}
	// UnmarshalOptions 可配置的 JSON 反序列化选项。
	UnmarshalOptions = protojson.UnmarshalOptions{
		DiscardUnknown: true,
	}
)

Functions

func Marshal

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

func Unmarshal

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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