myjson

package
v1.11.22 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date added in v1.10.5

type Date time.Time

func (*Date) MarshalJSON added in v1.10.5

func (d *Date) MarshalJSON() ([]byte, error)

func (Date) ToTime added in v1.10.6

func (t Date) ToTime() time.Time

func (*Date) UnmarshalJSON added in v1.10.5

func (d *Date) UnmarshalJSON(data []byte) error

type FieldValue

type FieldValue struct {
	Key   string
	Value any
}

func ToOrderMap

func ToOrderMap(jsonStr string) (list []FieldValue, err error)

type JSON

type JSON []byte

func (JSON) Equals

func (j JSON) Equals(j1 JSON) bool

func (JSON) IsNull

func (j JSON) IsNull() bool

func (JSON) MarshalJSON

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

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

func (*JSON) UnmarshalJSON

func (m *JSON) UnmarshalJSON(data []byte) error

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

type JsonObject added in v1.9.9

type JsonObject[V any] struct {
	Object V
}

func (*JsonObject[V]) Scan added in v1.9.9

func (s *JsonObject[V]) Scan(value interface{}) error

func (JsonObject[V]) Value added in v1.9.9

func (s JsonObject[V]) Value() (driver.Value, error)

type JsonSlice added in v1.9.8

type JsonSlice[V any] []V

func (*JsonSlice[V]) Scan added in v1.9.8

func (s *JsonSlice[V]) Scan(value interface{}) error

func (JsonSlice[V]) Value added in v1.9.8

func (s JsonSlice[V]) Value() (driver.Value, error)

type Millis added in v1.10.5

type Millis time.Time

Millis represents a Unix time in milliseconds since January 1, 1970 UTC.

func (Millis) MarshalJSON added in v1.10.5

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

func (Millis) ToTime added in v1.10.6

func (t Millis) ToTime() time.Time

func (*Millis) UnmarshalJSON added in v1.10.5

func (m *Millis) UnmarshalJSON(data []byte) error

type Nanos added in v1.10.5

type Nanos time.Time

Nanos represents a Unix time in nanoseconds since January 1, 1970 UTC.

func (Nanos) MarshalJSON added in v1.10.5

func (n Nanos) MarshalJSON() ([]byte, error)

func (Nanos) ToTime added in v1.10.6

func (t Nanos) ToTime() time.Time

func (*Nanos) UnmarshalJSON added in v1.10.5

func (n *Nanos) UnmarshalJSON(data []byte) error

type OrderArray

type OrderArray []any

type OrderMap

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

func (*OrderMap) Fields

func (self *OrderMap) Fields() []FieldValue

func (*OrderMap) MarshalJSON

func (self *OrderMap) MarshalJSON() ([]byte, error)

implementation of interface Marshaler

func (*OrderMap) UnmarshalJSON

func (self *OrderMap) UnmarshalJSON(b []byte) error

implementation of interface Unmarshaler

type Time added in v1.10.5

type Time time.Time

Time represents a long date string of the following format: "2006-01-02T15:04:05.000Z".

func (*Time) MarshalJSON added in v1.10.5

func (t *Time) MarshalJSON() ([]byte, error)

func (Time) ToTime added in v1.10.6

func (t Time) ToTime() time.Time

func (*Time) UnmarshalJSON added in v1.10.5

func (t *Time) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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