Documentation ¶
Index ¶
- func DecodeDate(i *jx.Decoder) (v time.Time, err error)
- func DecodeDateTime(i *jx.Decoder) (v time.Time, err error)
- func DecodeDuration(i *jx.Decoder) (v time.Duration, err error)
- func DecodeIP(i *jx.Decoder) (v netip.Addr, err error)
- func DecodeStringInt32(d *jx.Decoder) (v int32, err error)
- func DecodeStringInt64(d *jx.Decoder) (v int64, err error)
- func DecodeTime(i *jx.Decoder) (v time.Time, err error)
- func DecodeURI(i *jx.Decoder) (v url.URL, err error)
- func DecodeUUID(i *jx.Decoder) (v uuid.UUID, err error)
- func DecodeUnixMicro(d *jx.Decoder) (time.Time, error)
- func DecodeUnixMilli(d *jx.Decoder) (time.Time, error)
- func DecodeUnixNano(d *jx.Decoder) (time.Time, error)
- func DecodeUnixSeconds(d *jx.Decoder) (time.Time, error)
- func Encode(m Marshaler) []byte
- func EncodeDate(s *jx.Encoder, v time.Time)
- func EncodeDateTime(s *jx.Encoder, v time.Time)
- func EncodeDuration(s *jx.Encoder, v time.Duration)
- func EncodeIP(s *jx.Encoder, v netip.Addr)
- func EncodeStringInt32(e *jx.Encoder, v int32)
- func EncodeStringInt64(e *jx.Encoder, v int64)
- func EncodeTime(s *jx.Encoder, v time.Time)
- func EncodeURI(s *jx.Encoder, v url.URL)
- func EncodeUUID(s *jx.Encoder, v uuid.UUID)
- func EncodeUnixMicro(e *jx.Encoder, v time.Time)
- func EncodeUnixMilli(e *jx.Encoder, v time.Time)
- func EncodeUnixNano(e *jx.Encoder, v time.Time)
- func EncodeUnixSeconds(e *jx.Encoder, v time.Time)
- func Equal(a, b []byte) (bool, error)
- func LineColumn(offset int64, data []byte) (line, column int64, ok bool)
- func LocationUnmarshaler(data []byte) *json.Unmarshalers
- func Marshal(val interface{}) ([]byte, error)
- func Unmarshal(data []byte, val interface{}) error
- type Locatable
- type Location
- type Locator
- type Marshaler
- type Nullable
- type Resettable
- type Settable
- type Unmarshaler
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeDate ¶
DecodeDate decodes date from json.
func DecodeDateTime ¶
DecodeDateTime decodes date-time from json.
func DecodeDuration ¶
DecodeDuration decodes duration from json.
func DecodeStringInt32 ¶ added in v0.29.0
DecodeStringInt32 decodes string int32 from json.
func DecodeStringInt64 ¶ added in v0.29.0
DecodeStringInt64 decodes string int64 from json.
func DecodeTime ¶
DecodeTime decodes time from json.
func DecodeUUID ¶
DecodeUUID decodes UUID from json.
func DecodeUnixMicro ¶ added in v0.30.0
DecodeUnixMicro decodes unix-micro from json.
func DecodeUnixMilli ¶ added in v0.30.0
DecodeUnixMilli decodes unix-milli from json.
func DecodeUnixNano ¶ added in v0.30.0
DecodeUnixNano decodes unix-nano from json.
func DecodeUnixSeconds ¶ added in v0.30.0
DecodeUnixSeconds decodes unix-seconds from json.
func EncodeDateTime ¶
EncodeDateTime encodes date-time to json.
func EncodeDuration ¶
EncodeDuration encodes duration to json.
func EncodeStringInt32 ¶ added in v0.29.0
EncodeStringInt32 encodes string int32 to json.
func EncodeStringInt64 ¶ added in v0.29.0
EncodeStringInt64 encodes string int64 to json.
func EncodeUnixMicro ¶ added in v0.30.0
EncodeUnixMicro encodes unix-micro to json.
func EncodeUnixMilli ¶ added in v0.30.0
EncodeUnixMilli encodes unix-milli to json.
func EncodeUnixNano ¶ added in v0.30.0
EncodeUnixNano encodes unix-nano to json.
func EncodeUnixSeconds ¶ added in v0.30.0
EncodeUnixSeconds encodes unix-seconds to json.
func LineColumn ¶ added in v0.42.0
LineColumn returns the line and column of the location.
If offset is invalid, line and column are 0 and ok is false.
func LocationUnmarshaler ¶ added in v0.42.0
func LocationUnmarshaler(data []byte) *json.Unmarshalers
LocationUnmarshaler is json.Unmarshalers that sets the location.
Types ¶
type Location ¶ added in v0.42.0
type Location struct { JSONPointer string `json:"-"` Offset int64 `json:"-"` Line, Column int64 `json:"-"` }
Location is a JSON value location.
type Locator ¶ added in v0.42.0
type Locator struct {
// contains filtered or unexported fields
}
Locator stores the Location of a JSON value.
type Settable ¶
type Settable interface {
IsSet() bool
}
Settable value can be set (present) or unset (i.e. not provided or undefined).
type Unmarshaler ¶
Unmarshaler implements json reading.