json

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN = iota
	ON
	OFF
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Example

type Example struct {
	Id     int64   `json:"id,omitempty"`
	Name   string  `json:"name,omitempty"`
	Price  float64 `json:"price,omitempty"`
	Status int     // the Go language is more poorer than protobuf lang, it doesn't have Enum :(
	Result []struct {
		Status bool              `json:"status,omitempty"`
		Msg    []byte            `json:"msg,omitempty"`
		Kv     map[string]string `json:"kv,omitempty"`
	} `json:"result,omitempty"`
}

This Example struct is as close as possible to a protobuf struct ./examples/protocols/protobuf/Example

func (*Example) Marshal

func (e *Example) Marshal() ([]byte, error)

func (*Example) Reset added in v1.1.0

func (e *Example) Reset()

func (*Example) Unmarshal

func (e *Example) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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