2017-01-22 23:29:48 +08:00
|
|
|
package jsoniter
|
|
|
|
|
|
|
|
type nilAny struct {
|
2017-01-24 00:23:07 +08:00
|
|
|
baseAny
|
2017-01-22 23:29:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) LastError() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-01-26 16:24:01 +08:00
|
|
|
func (any *nilAny) ValueType() ValueType {
|
|
|
|
return Nil
|
|
|
|
}
|
|
|
|
|
2017-06-19 21:21:20 +08:00
|
|
|
func (any *nilAny) MustBeValid() Any {
|
|
|
|
return any
|
|
|
|
}
|
|
|
|
|
2017-01-22 23:29:48 +08:00
|
|
|
func (any *nilAny) ToBool() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToInt() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToInt32() int32 {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToInt64() int64 {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2017-01-29 16:55:32 +08:00
|
|
|
func (any *nilAny) ToUint() uint {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToUint32() uint32 {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToUint64() uint64 {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2017-01-22 23:29:48 +08:00
|
|
|
func (any *nilAny) ToFloat32() float32 {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToFloat64() float64 {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) ToString() string {
|
2017-02-12 22:49:45 +08:00
|
|
|
return ""
|
2017-01-26 14:56:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) WriteTo(stream *Stream) {
|
|
|
|
stream.WriteNil()
|
2017-01-26 15:40:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) Parse() *Iterator {
|
|
|
|
return nil
|
2017-01-26 15:44:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (any *nilAny) GetInterface() interface{} {
|
|
|
|
return nil
|
2017-06-06 23:27:00 +08:00
|
|
|
}
|