any_nil.go (916B)
1 package jsoniter 2 3 type nilAny struct { 4 baseAny 5 } 6 7 func (any *nilAny) LastError() error { 8 return nil 9 } 10 11 func (any *nilAny) ValueType() ValueType { 12 return NilValue 13 } 14 15 func (any *nilAny) MustBeValid() Any { 16 return any 17 } 18 19 func (any *nilAny) ToBool() bool { 20 return false 21 } 22 23 func (any *nilAny) ToInt() int { 24 return 0 25 } 26 27 func (any *nilAny) ToInt32() int32 { 28 return 0 29 } 30 31 func (any *nilAny) ToInt64() int64 { 32 return 0 33 } 34 35 func (any *nilAny) ToUint() uint { 36 return 0 37 } 38 39 func (any *nilAny) ToUint32() uint32 { 40 return 0 41 } 42 43 func (any *nilAny) ToUint64() uint64 { 44 return 0 45 } 46 47 func (any *nilAny) ToFloat32() float32 { 48 return 0 49 } 50 51 func (any *nilAny) ToFloat64() float64 { 52 return 0 53 } 54 55 func (any *nilAny) ToString() string { 56 return "" 57 } 58 59 func (any *nilAny) WriteTo(stream *Stream) { 60 stream.WriteNil() 61 } 62 63 func (any *nilAny) Parse() *Iterator { 64 return nil 65 } 66 67 func (any *nilAny) GetInterface() interface{} { 68 return nil 69 }