json

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(in io.Reader, model interface{}) error

func Encode

func Encode(out io.Writer, model interface{}) error

func Marshal

func Marshal(model interface{}) ([]byte, error)

func Unmarshal

func Unmarshal(data []byte, model interface{}) error

Types

type Decimal

type Decimal struct {
	primitive.Decimal128
}

func (Decimal) MarshalJSON

func (d Decimal) MarshalJSON() ([]byte, error)

func (*Decimal) UnmarshalJSON

func (d *Decimal) UnmarshalJSON(b []byte) error

type Int32

type Int32 int32

func (*Int32) UnmarshalJSON

func (o *Int32) UnmarshalJSON(b []byte) error

type Int64

type Int64 int64

func (*Int64) UnmarshalJSON

func (o *Int64) UnmarshalJSON(b []byte) error

type Time

type Time struct {
	time.Time
}

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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