gjson/base.go

15 lines
427 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package gjson
// JSONBaseObject 抽象对象代表所有能够进行JSON序列化和反序列化的对象
type JSONBaseObject interface {
ToJSON() (string, error)
FromJSON(jsonStr string) error
ToString() (string, error)
FromString(str string) error
}
// JSONValue 代表简单值对象子类型包括JSONString、JSONNumber、JSONBool、JSONNull
type JSONValue interface {
JSONBaseObject
Value() interface{}
}