json

package
v0.0.0-...-67c52db Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: MIT Imports: 4 Imported by: 0

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

This section is empty.

Types

type Codec

type Codec struct{}

Codec is a Codec implementation with json.

func (Codec) Marshal

func (Codec) Marshal(v interface{}) ([]byte, error)

func (Codec) Name

func (Codec) Name() string

func (Codec) Unmarshal

func (Codec) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

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