json

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToBase58

func ToBase58(encoder *jsontext.Encoder, t []byte, options json.Options) error

func ToBase64 added in v1.6.0

func ToBase64(encoder *jsontext.Encoder, t []byte, options json.Options) error

func ToHex

func ToHex(encoder *jsontext.Encoder, t []byte, options json.Options) error

Types

type Marshaller

type Marshaller struct {
	// contains filtered or unexported fields
}

func NewMarshaller

func NewMarshaller(registry *proto.Registry, options ...MarshallerOption) *Marshaller

func (*Marshaller) Marshal

func (m *Marshaller) Marshal(in any) error

func (*Marshaller) MarshalToString

func (m *Marshaller) MarshalToString(in any) (string, error)

type MarshallerOption

type MarshallerOption func(*Marshaller)

func WithBytesEncoderFunc

func WithBytesEncoderFunc(f func(encoder *jsontext.Encoder, t []byte, options json.Options) error) MarshallerOption

func WithoutUnknownFields

func WithoutUnknownFields() MarshallerOption

Jump to

Keyboard shortcuts

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