jsonpb

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetJSONResponseType

func SetJSONResponseType(resp http.ResponseWriter, code int)

SetJSONResponseType hard set encode type as JSON UTF-8

Types

type Marshaler

type Marshaler interface {
	SetIdent(string)
	Encode(io.Writer, interface{}) error
	Marshal(interface{}) ([]byte, error)
	SetUseProtoNames(bool)
	SetUseEnumNumbers(bool)
	SetEmitUnpopulated(bool)
}

Marshaler marshaler interface

func NewMarshaler

func NewMarshaler() Marshaler

NewMarshaler get marshaler instanse

type Unmarshaler

type Unmarshaler interface {
	Decode(io.ReadCloser, interface{}) error
	Unmarshal([]byte, interface{}) error
}

Unmarshaler unmarshaler interface

func NewUnmarshaler

func NewUnmarshaler() Unmarshaler

NewUnmarshaler get unmarshaler instanse

Jump to

Keyboard shortcuts

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