Documentation ¶
Index ¶
- Constants
- type Decoder
- func (dec *Decoder) BeforeReadArray(jsonKey string) (isNULL bool, err error)
- func (dec *Decoder) BeforeReadMap(jsonKey string) (isNULL bool, err error)
- func (dec *Decoder) BeforeReadNext(jsonKey string) (isEnd bool, err error)
- func (dec *Decoder) BeforeReadObject(jsonKey string) (isNULL bool, err error)
- func (dec *Decoder) BeforeScanJSON() (isNULL bool, err error)
- func (dec *Decoder) BeforeScanNext() (isEnd bool, err error)
- func (dec *Decoder) DiscardValue(jsonKey string) (err error)
- func (dec *Decoder) NextLiteralIsNULL(jsonKey string) (isNULL bool, err error)
- func (dec *Decoder) ReadJSONKey() (jsonKey string, err error)
- func (dec *Decoder) ReadLiteralBool(jsonKey string, unquote bool) (vv bool, err error)
- func (dec *Decoder) ReadLiteralBytes(jsonKey string) (vv []byte, err error)
- func (dec *Decoder) ReadLiteralEnumNumber(jsonKey string, unquote bool) (vv int32, err error)
- func (dec *Decoder) ReadLiteralEnumString(jsonKey string, em map[string]int32) (vv int32, err error)
- func (dec *Decoder) ReadLiteralFloat32(jsonKey string, unquote bool) (vv float32, err error)
- func (dec *Decoder) ReadLiteralFloat64(jsonKey string, unquote bool) (vv float64, err error)
- func (dec *Decoder) ReadLiteralInt32(jsonKey string, unquote bool) (vv int32, err error)
- func (dec *Decoder) ReadLiteralInt64(jsonKey string, unquote bool) (vv int64, err error)
- func (dec *Decoder) ReadLiteralInterface(jsonKey string, vv interface{}) (err error)
- func (dec *Decoder) ReadLiteralString(jsonKey string) (vv string, err error)
- func (dec *Decoder) ReadLiteralUint32(jsonKey string, unquote bool) (vv uint32, err error)
- func (dec *Decoder) ReadLiteralUint64(jsonKey string, unquote bool) (vv uint64, err error)
- func (dec *Decoder) ReadMapKeyBool(jsonKey string, unquote bool) (vv bool, err error)
- func (dec *Decoder) ReadMapKeyInt32(jsonKey string, unquote bool) (vv int32, err error)
- func (dec *Decoder) ReadMapKeyInt64(jsonKey string, unquote bool) (vv int64, err error)
- func (dec *Decoder) ReadMapKeyString(jsonKey string) (vv string, err error)
- func (dec *Decoder) ReadMapKeyUint32(jsonKey string, unquote bool) (vv uint32, err error)
- func (dec *Decoder) ReadMapKeyUint64(jsonKey string, unquote bool) (vv uint64, err error)
- func (dec *Decoder) ReadObjectKey(jsonKey string) (objKey string, err error)
- func (dec *Decoder) ReadPointerBool(jsonKey string, unquote bool) (vv *bool, err error)
- func (dec *Decoder) ReadPointerEnumNumber(jsonKey string, unquote bool) (vv *int32, err error)
- func (dec *Decoder) ReadPointerEnumString(jsonKey string, em map[string]int32) (vv *int32, err error)
- func (dec *Decoder) ReadPointerFloat32(jsonKey string, unquote bool) (vv *float32, err error)
- func (dec *Decoder) ReadPointerFloat64(jsonKey string, unquote bool) (vv *float64, err error)
- func (dec *Decoder) ReadPointerInt32(jsonKey string, unquote bool) (vv *int32, err error)
- func (dec *Decoder) ReadPointerInt64(jsonKey string, unquote bool) (vv *int64, err error)
- func (dec *Decoder) ReadPointerString(jsonKey string) (vv *string, err error)
- func (dec *Decoder) ReadPointerUint32(jsonKey string, unquote bool) (vv *uint32, err error)
- func (dec *Decoder) ReadPointerUint64(jsonKey string, unquote bool) (vv *uint64, err error)
- func (dec *Decoder) ReadWKTAnyByProto(jsonKey string, vv *any.Any) (err error)
- func (dec *Decoder) ReadWKTDurationByHours(jsonKey string, vv *durationpb.Duration, unquote bool) (err error)
- func (dec *Decoder) ReadWKTDurationByMicroseconds(jsonKey string, vv *durationpb.Duration, unquote bool) (err error)
- func (dec *Decoder) ReadWKTDurationByMilliseconds(jsonKey string, vv *durationpb.Duration, unquote bool) (err error)
- func (dec *Decoder) ReadWKTDurationByMinutes(jsonKey string, vv *durationpb.Duration, unquote bool) (err error)
- func (dec *Decoder) ReadWKTDurationByNanoseconds(jsonKey string, vv *durationpb.Duration, unquote bool) (err error)
- func (dec *Decoder) ReadWKTDurationBySeconds(jsonKey string, vv *durationpb.Duration, unquote bool) (err error)
- func (dec *Decoder) ReadWKTDurationByString(jsonKey string, vv *durationpb.Duration) (err error)
- func (dec *Decoder) ReadWKTTimestampByString(jsonKey string, vv *timestamppb.Timestamp, layout string) (err error)
- func (dec *Decoder) ReadWKTTimestampByUnixMicro(jsonKey string, vv *timestamppb.Timestamp, unquote bool) (err error)
- func (dec *Decoder) ReadWKTTimestampByUnixMilli(jsonKey string, vv *timestamppb.Timestamp, unquote bool) (err error)
- func (dec *Decoder) ReadWKTTimestampByUnixNano(jsonKey string, vv *timestamppb.Timestamp, unquote bool) (err error)
- func (dec *Decoder) ReadWKTTimestampByUnixSec(jsonKey string, vv *timestamppb.Timestamp, unquote bool) (err error)
- type Error
- type OpCode
- type ParsePhase
Constants ¶
const PhasePanicMsg = "JSON decoder out of sync - data changing underfoot?"
PhasePanicMsg is used as a panic message when we end up with something that shouldn't happen. It can indicate a bug in the JSON decoder, or that something is editing the data slice while the decoder executes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func (*Decoder) BeforeReadArray ¶
func (*Decoder) BeforeReadMap ¶
func (*Decoder) BeforeReadNext ¶
func (*Decoder) BeforeReadObject ¶
func (*Decoder) BeforeScanJSON ¶
BeforeScanJSON only used to check if the JSON is NULL before loop scan.
func (*Decoder) BeforeScanNext ¶
BeforeScanNext only used to before read JSON key that in top level.
func (*Decoder) DiscardValue ¶
DiscardValue used to discard the next value.
func (*Decoder) NextLiteralIsNULL ¶
NextLiteralIsNULL only used to check if the next value that type of pointer value is NULL.
func (*Decoder) ReadJSONKey ¶
ReadJSONKey used to read JSON key that in top level. The `jsonKey` is unsafe after unmarshal end.
func (*Decoder) ReadLiteralBool ¶
func (*Decoder) ReadLiteralBytes ¶
func (*Decoder) ReadLiteralEnumNumber ¶
func (*Decoder) ReadLiteralEnumString ¶
func (*Decoder) ReadLiteralFloat32 ¶
func (*Decoder) ReadLiteralFloat64 ¶
func (*Decoder) ReadLiteralInt32 ¶
func (*Decoder) ReadLiteralInt64 ¶
func (*Decoder) ReadLiteralInterface ¶
func (*Decoder) ReadLiteralString ¶
func (*Decoder) ReadLiteralUint32 ¶
func (*Decoder) ReadLiteralUint64 ¶
func (*Decoder) ReadMapKeyBool ¶
func (*Decoder) ReadMapKeyInt32 ¶
func (*Decoder) ReadMapKeyInt64 ¶
func (*Decoder) ReadMapKeyString ¶
func (*Decoder) ReadMapKeyUint32 ¶
func (*Decoder) ReadMapKeyUint64 ¶
func (*Decoder) ReadObjectKey ¶
ReadObjectKey is wrappers for readObjectKey. The `objKey` is unsafe after unmarshal end.
func (*Decoder) ReadPointerBool ¶
func (*Decoder) ReadPointerEnumNumber ¶
func (*Decoder) ReadPointerEnumString ¶
func (*Decoder) ReadPointerFloat32 ¶
func (*Decoder) ReadPointerFloat64 ¶
func (*Decoder) ReadPointerInt32 ¶
func (*Decoder) ReadPointerInt64 ¶
func (*Decoder) ReadPointerString ¶
func (*Decoder) ReadPointerUint32 ¶
func (*Decoder) ReadPointerUint64 ¶
func (*Decoder) ReadWKTAnyByProto ¶
func (*Decoder) ReadWKTDurationByHours ¶
func (*Decoder) ReadWKTDurationByMicroseconds ¶
func (*Decoder) ReadWKTDurationByMilliseconds ¶
func (*Decoder) ReadWKTDurationByMinutes ¶
func (*Decoder) ReadWKTDurationByNanoseconds ¶
func (*Decoder) ReadWKTDurationBySeconds ¶
func (*Decoder) ReadWKTDurationByString ¶
func (dec *Decoder) ReadWKTDurationByString(jsonKey string, vv *durationpb.Duration) (err error)
func (*Decoder) ReadWKTTimestampByString ¶
func (*Decoder) ReadWKTTimestampByUnixMicro ¶
func (*Decoder) ReadWKTTimestampByUnixMilli ¶
func (*Decoder) ReadWKTTimestampByUnixNano ¶
func (*Decoder) ReadWKTTimestampByUnixSec ¶
type Error ¶
type ParsePhase ¶
type ParsePhase int8