15 lines
427 B
Go
15 lines
427 B
Go
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{}
|
||
} |