json

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 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

func MarshalToString

func MarshalToString(v interface{}) (string, error)

func MustMarshal

func MustMarshal(v interface{}) []byte

func MustMarshalToString

func MustMarshalToString(v interface{}) string

func MustUnmarshal

func MustUnmarshal(b []byte, v interface{})

func MustUnmarshalFromString

func MustUnmarshalFromString(s string, v interface{})

func Unmarshal

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

func UnmarshalFromString

func UnmarshalFromString(str string, v interface{}) error

Types

type NumericString

type NumericString struct {
	// contains filtered or unexported fields
}

NumericString is numeric value stored in string representation. It supports JSON unmarshalling from numeric and string.

func NewNumericString

func NewNumericString(v string) (*NumericString, error)

func NewNumericStringFromUint64

func NewNumericStringFromUint64(v uint64) *NumericString

func (NumericString) MarshalJSON

func (u NumericString) MarshalJSON() ([]byte, error)

func (NumericString) String

func (u NumericString) String() string

func (*NumericString) UnmarshalJSON

func (u *NumericString) UnmarshalJSON(data []byte) error

type Uint16

type Uint16 struct {
	// contains filtered or unexported fields
}

func NewUint16

func NewUint16(v uint16) Uint16

func (Uint16) MarshalJSON

func (u Uint16) MarshalJSON() ([]byte, error)

func (Uint16) String

func (u Uint16) String() string

func (Uint16) Uint16

func (u Uint16) Uint16() uint16

func (*Uint16) UnmarshalJSON

func (u *Uint16) UnmarshalJSON(data []byte) error

type Uint32

type Uint32 struct {
	// contains filtered or unexported fields
}

func NewUint32

func NewUint32(v uint32) Uint32

func (Uint32) MarshalJSON

func (u Uint32) MarshalJSON() ([]byte, error)

func (Uint32) String

func (u Uint32) String() string

func (Uint32) Uint32

func (u Uint32) Uint32() uint32

func (*Uint32) UnmarshalJSON

func (u *Uint32) UnmarshalJSON(data []byte) error

type Uint64

type Uint64 struct {
	// contains filtered or unexported fields
}

func NewUint64

func NewUint64(v uint64) Uint64

func NewUint64FromString

func NewUint64FromString(v string) (*Uint64, error)

func (Uint64) MarshalJSON

func (u Uint64) MarshalJSON() ([]byte, error)

func (Uint64) String

func (u Uint64) String() string

func (Uint64) Uint64

func (u Uint64) Uint64() uint64

func (*Uint64) UnmarshalJSON

func (u *Uint64) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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