pb

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONPb

type JSONPb jsonpb.Marshaler

JSONPb is a Marshaler which marshals/unmarshals into/from JSON with the "github.com/gogo/protobuf/jsonpb". It supports fully functionality of protobuf unlike JSONBuiltin.

func (*JSONPb) ContentType

func (*JSONPb) ContentType() string

ContentType always returns "application/json".

func (*JSONPb) Marshal

func (j *JSONPb) Marshal(v interface{}) (data []byte, err error)

Marshal marshals "v" into JSON

func (*JSONPb) NewDecoder

func (j *JSONPb) NewDecoder(r io.Reader) gwruntime.Decoder

NewDecoder returns a Decoder which reads JSON stream from "r".

func (*JSONPb) NewEncoder

func (j *JSONPb) NewEncoder(w io.Writer) gwruntime.Encoder

NewEncoder returns an Encoder which writes JSON stream into "w".

func (*JSONPb) Unmarshal

func (j *JSONPb) Unmarshal(data []byte, v interface{}) error

Unmarshal unmarshals JSON "data" into "v"

Jump to

Keyboard shortcuts

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