1
0
mirror of https://github.com/json-iterator/go.git synced 2024-12-12 09:03:48 +02:00
json-iterator/any_nil.go

70 lines
916 B
Go
Raw Normal View History

2017-01-22 17:29:48 +02:00
package jsoniter
type nilAny struct {
baseAny
2017-01-22 17:29:48 +02:00
}
func (any *nilAny) LastError() error {
return nil
}
2017-01-26 10:24:01 +02:00
func (any *nilAny) ValueType() ValueType {
return NilValue
2017-01-26 10:24:01 +02:00
}
2017-06-19 15:21:20 +02:00
func (any *nilAny) MustBeValid() Any {
return any
}
2017-01-22 17:29:48 +02: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 10:55:32 +02: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 17:29:48 +02:00
func (any *nilAny) ToFloat32() float32 {
return 0
}
func (any *nilAny) ToFloat64() float64 {
return 0
}
func (any *nilAny) ToString() string {
2017-02-12 16:49:45 +02:00
return ""
2017-01-26 08:56:31 +02:00
}
func (any *nilAny) WriteTo(stream *Stream) {
stream.WriteNil()
2017-01-26 09:40:38 +02:00
}
func (any *nilAny) Parse() *Iterator {
return nil
2017-01-26 09:44:10 +02:00
}
func (any *nilAny) GetInterface() interface{} {
return nil
2017-06-06 17:27:00 +02:00
}