You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-24 23:16:47 +02:00
add Any.ToVal
This commit is contained in:
@ -19,10 +19,14 @@ type Any interface {
|
||||
ToFloat32() float32
|
||||
ToFloat64() float64
|
||||
ToString() string
|
||||
ToVal(val interface{})
|
||||
Get(path ...interface{}) Any
|
||||
// TODO: add Set
|
||||
Size() int
|
||||
Keys() []string
|
||||
// TODO: remove me
|
||||
GetArray() []Any
|
||||
// TODO: remove me
|
||||
GetObject() map[string]Any
|
||||
GetInterface() interface{}
|
||||
WriteTo(stream *Stream)
|
||||
@ -50,6 +54,10 @@ func (any *baseAny) GetObject() map[string]Any {
|
||||
return map[string]Any{}
|
||||
}
|
||||
|
||||
func (any *baseAny) ToVal(obj interface{}) {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func WrapInt32(val int32) Any {
|
||||
return &int32Any{baseAny{}, val}
|
||||
}
|
||||
|
Reference in New Issue
Block a user