增加每一项是否为interface类型的判断
This commit is contained in:
15
array.go
15
array.go
@ -56,3 +56,18 @@ func (at *ArrayType) IsValid() bool {
|
||||
}
|
||||
return strings.HasPrefix(string(byteData), "[") && strings.HasSuffix(string(byteData), "]")
|
||||
}
|
||||
|
||||
// ItemIsInterface 数组每一项是否为interface
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 21:20 2023/6/11
|
||||
func (at *ArrayType) ItemIsInterface() bool {
|
||||
if !at.IsValid() {
|
||||
return false
|
||||
}
|
||||
if _, ok := at.value.([]interface{}); ok {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user