json

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: AGPL-3.0 Imports: 6 Imported by: 8 modules, 48 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON

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

MarshalJSON implements json.Marshaler.

func (*Duration) UnmarshalJSON

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

UnmarshalJSON fulfills the encoding/json.Unmarshaler interface. It attempts to parse text as a time.Duration string. The Go documentation defines this as a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"). If there is no time unit, UnmarshalJSON defaults to ms.

type HexBytes

type HexBytes []byte

func (HexBytes) MarshalText

func (h HexBytes) MarshalText() ([]byte, error)

func (*HexBytes) UnmarshalText

func (h *HexBytes) UnmarshalText(text []byte) error

type Map

type Map []byte

func (Map) MarshalJSON

func (m Map) MarshalJSON() ([]byte, error)

func (*Map) UnmarshalJSON

func (m *Map) UnmarshalJSON(text []byte) error

Jump to

Keyboard shortcuts

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