deserialize

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: GPL-3.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deserializer

type Deserializer struct {
	JSONUnmarshaler *jsonpb.Unmarshaler
}

Deserializer deserializes.

func New

func New() *Deserializer

func (Deserializer) JSONToProto

func (d Deserializer) JSONToProto(requestBody io.ReadCloser, unmarshalObj proto.Message) (err error)

JSONToProto converts json stream to protobuf

func (Deserializer) YAMLToProto

func (d Deserializer) YAMLToProto(data []byte, msg proto.Message) error

YAMLToProto does a roundabout way of converting yaml to protobuf by using json as intermediary

func (Deserializer) YAMLToStruct

func (d Deserializer) YAMLToStruct(data []byte, resp interface{}) error

YAMLToStruct populates your struct with specified byte array

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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