ujson

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitNilSlice added in v0.5.22

func InitNilSlice(v any)

func InitNilSliceFlat added in v0.5.22

func InitNilSliceFlat(i any)

func MarshalLowerCase added in v0.1.74

func MarshalLowerCase(v any) (bytes []byte, err error)

func NullArray added in v0.2.59

func NullArray(bytes []byte) []byte

func SetIfExists added in v0.7.2

func SetIfExists[T any](src StringNumberI[T], dst *T) (err error)

func ToLowerCase added in v0.1.74

func ToLowerCase(j []byte)

Types

type Bool added in v0.2.31

type Bool bool

func (*Bool) UnmarshalJSON added in v0.2.31

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

func (Bool) Value added in v0.2.31

func (o Bool) Value() bool

type Duration added in v0.1.86

type Duration time.Duration

func (Duration) Std added in v0.1.86

func (o Duration) Std() time.Duration

func (*Duration) UnmarshalJSON added in v0.1.86

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

type Float64 added in v0.2.16

type Float64 float64

func (Float64) IsZero added in v0.2.83

func (o Float64) IsZero() bool

func (Float64) MarshalJSON added in v0.2.16

func (o Float64) MarshalJSON() ([]byte, error)

func (Float64) NilIfZero added in v0.2.83

func (o Float64) NilIfZero() *float64

func (Float64) Ptr added in v0.2.46

func (o Float64) Ptr() *float64

func (*Float64) Set added in v0.2.49

func (o *Float64) Set(v float64)

func (*Float64) UnmarshalJSON added in v0.2.16

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

func (Float64) Value added in v0.2.16

func (o Float64) Value() float64

type Int64 added in v0.2.16

type Int64 int64

func (Int64) IsZero added in v0.2.83

func (o Int64) IsZero() bool

func (Int64) MarshalJSON added in v0.2.16

func (o Int64) MarshalJSON() ([]byte, error)

func (Int64) NilIfZero added in v0.2.83

func (o Int64) NilIfZero() *int64

func (Int64) Ptr added in v0.2.46

func (o Int64) Ptr() *int64

func (*Int64) Set added in v0.2.49

func (o *Int64) Set(v int64)

func (*Int64) UnmarshalJSON added in v0.2.16

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

func (Int64) Value added in v0.2.16

func (o Int64) Value() int64

type Optional added in v0.1.85

type Optional[T any] struct {
	Has   bool
	Value *T
}

func (*Optional[T]) UnmarshalJSON added in v0.1.85

func (o *Optional[T]) UnmarshalJSON(b []byte) error

type StringFloat64 added in v0.2.45

type StringFloat64 string

func (StringFloat64) Empty added in v0.2.45

func (o StringFloat64) Empty() bool

func (StringFloat64) Exists added in v0.2.45

func (o StringFloat64) Exists() bool

func (*StringFloat64) Set added in v0.3.26

func (o *StringFloat64) Set(v float64)

func (*StringFloat64) SetWithPrecision added in v0.3.27

func (o *StringFloat64) SetWithPrecision(v float64, precison int)

func (StringFloat64) Value added in v0.2.45

func (o StringFloat64) Value() (float64, error)

func (StringFloat64) ValueOr added in v0.2.56

func (o StringFloat64) ValueOr(v float64) float64

func (StringFloat64) ValueOrDefault added in v0.2.56

func (o StringFloat64) ValueOrDefault() float64

type StringInt64 added in v0.2.45

type StringInt64 string

func (StringInt64) Empty added in v0.2.45

func (o StringInt64) Empty() bool

func (StringInt64) Exists added in v0.2.45

func (o StringInt64) Exists() bool

func (*StringInt64) Set added in v0.3.26

func (o *StringInt64) Set(v int64)

func (StringInt64) Value added in v0.2.45

func (o StringInt64) Value() (int64, error)

func (StringInt64) ValueOr added in v0.2.56

func (o StringInt64) ValueOr(v int64) int64

func (StringInt64) ValueOrDefault added in v0.2.56

func (o StringInt64) ValueOrDefault() int64

type StringNumber added in v0.2.44

type StringNumber string

func (StringNumber) Empty added in v0.2.44

func (o StringNumber) Empty() bool

func (StringNumber) Exists added in v0.2.44

func (o StringNumber) Exists() bool

func (StringNumber) Float64 added in v0.2.44

func (o StringNumber) Float64() (float64, error)

func (StringNumber) Int64 added in v0.2.44

func (o StringNumber) Int64() (int64, error)

type StringNumberI added in v0.7.2

type StringNumberI[T any] interface {
	Exists() bool
	Value() (T, error)
}

type TimeMs added in v0.2.48

type TimeMs time.Time

func (TimeMs) Ptr added in v0.2.82

func (o TimeMs) Ptr() *time.Time

func (TimeMs) Std added in v0.2.48

func (o TimeMs) Std() time.Time

func (*TimeMs) UnmarshalJSON added in v0.2.48

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

Jump to

Keyboard shortcuts

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