json

package
v2.5.0-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustMarshal

func MustMarshal(v interface{}) []byte

MustMarshal is a convenience function to marshal an object successfully or panic

func RemoveMapFields

func RemoveMapFields(config, live map[string]interface{}) map[string]interface{}

RemoveMapFields remove all non-existent fields in the live that don't exist in the config

Types

type JSONMarshaler

type JSONMarshaler struct{}

JSONMarshaler is a type which satisfies the grpc-gateway Marshaler interface

func (*JSONMarshaler) ContentType

func (j *JSONMarshaler) ContentType() string

ContentType implements gwruntime.Marshaler.

func (*JSONMarshaler) Marshal

func (j *JSONMarshaler) Marshal(v interface{}) ([]byte, error)

Marshal implements gwruntime.Marshaler.

func (*JSONMarshaler) NewDecoder

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

NewDecoder implements gwruntime.Marshaler.

func (*JSONMarshaler) NewEncoder

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

NewEncoder implements gwruntime.Marshaler.

func (*JSONMarshaler) Unmarshal

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

Unmarshal implements gwruntime.Marshaler.

Jump to

Keyboard shortcuts

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