encoding

package
v0.0.0-...-24d46bf Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const Name = "json"

Name is the name registered for the json codec.

Variables

View Source
var (
	// MarshalOptions is a configurable JSON format marshaller.
	MarshalOptions = protojson.MarshalOptions{
		EmitUnpopulated: true,
	}
	// UnmarshalOptions is a configurable JSON format parser.
	UnmarshalOptions = protojson.UnmarshalOptions{
		DiscardUnknown: true,
	}
)

Functions

func GetJsonCodec

func GetJsonCodec() encoding.Codec

func Init

func Init()

Types

type SpecialInterface

type SpecialInterface interface {
	GetSpecialData() []byte
}

SpecialInterface 非常直接的返回,不再Marshal,性能优先的时候使用

Jump to

Keyboard shortcuts

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