json

package
v1.7.36 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalToString added in v1.3.9

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 added in v1.3.9

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

func UnmarshalFromString added in v1.3.9

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