jsonext

package
v0.3.54 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration time.Duration

func (Duration) MarshalText

func (v Duration) MarshalText() ([]byte, error)

func (Duration) String

func (v Duration) String() string

func (*Duration) UnmarshalText

func (v *Duration) UnmarshalText(b []byte) error

func (Duration) Value

func (v Duration) Value() time.Duration

type Opt added in v0.2.0

type Opt[T any] struct {
	Valid bool
	Value T
}

func (Opt[T]) MarshalJSON added in v0.2.0

func (v Opt[T]) MarshalJSON() ([]byte, error)

func (*Opt[T]) UnmarshalJSON added in v0.2.0

func (v *Opt[T]) UnmarshalJSON(b []byte) error

type OptTime added in v0.2.0

type OptTime time.Time

func (OptTime) Before added in v0.2.0

func (v OptTime) Before(r OptTime) bool

func (OptTime) BeforeTime added in v0.2.0

func (v OptTime) BeforeTime(r time.Time) bool

func (*OptTime) DecodeMsgpack added in v0.2.0

func (v *OptTime) DecodeMsgpack(dec *msgpack.Decoder) error

func (*OptTime) EncodeMsgpack added in v0.2.0

func (v *OptTime) EncodeMsgpack(enc *msgpack.Encoder) error

func (OptTime) IsZero added in v0.2.0

func (v OptTime) IsZero() bool

func (OptTime) MarshalJSON added in v0.2.0

func (v OptTime) MarshalJSON() ([]byte, error)

func (*OptTime) UnmarshalJSON added in v0.2.0

func (v *OptTime) UnmarshalJSON(b []byte) error

func (OptTime) Value added in v0.2.0

func (v OptTime) Value() time.Time

type String added in v0.3.2

type String string

func (*String) UnmarshalJSON added in v0.3.2

func (v *String) UnmarshalJSON(b []byte) error

type StringNonZero added in v0.3.2

type StringNonZero string

StringNonZero is a string that can also be unmarshalled from a JSON integer, converting integer 0 into an empty string.

func (StringNonZero) IsZero added in v0.3.2

func (v StringNonZero) IsZero() bool

func (StringNonZero) String added in v0.3.2

func (v StringNonZero) String() string

func (*StringNonZero) UnmarshalJSON added in v0.3.2

func (v *StringNonZero) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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