Documentation
¶
Overview ¶
存取值用的键值对象 等同于Java中的HashMap 或 C#中的Dictionary对象。
Index ¶
- type EJson
- func (this *EJson) Clear() *EJson
- func (this *EJson) Data() interface{}
- func (this *EJson) Del(key string) error
- func (this *EJson) E删除(key string) error
- func (this *EJson) E到JSON(是否修饰 bool) string
- func (this *EJson) E取值(key string) int64
- func (this *EJson) E取文本(key string) string
- func (this *EJson) E取逻辑值(key string) bool
- func (this *EJson) GetArrayAllData(s string) []*gabs.Container
- func (this *EJson) GetArrayCount(s string) int
- func (this *EJson) GetBool(key string) bool
- func (this *EJson) GetInt(key string) int64
- func (this *EJson) GetString(key string) string
- func (this *EJson) Init() *EJson
- func (this *EJson) LoadFromJsonFile(filepath string) bool
- func (this *EJson) LoadFromJsonString(data string) bool
- func (this *EJson) Set(key string, value interface{})
- func (this *EJson) SetArray(key string, value interface{})
- func (this *EJson) ToJson(是否修饰 bool) string
- type H
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EJson ¶
func (*EJson) GetArrayAllData ¶
GetArrayAllData 获取某个数组里面的所有数据
for i, object := range v.GetArrayAllData("array.list") {
fmt.Printf("i:%s value:%s \n", i, object.Path("avg").Data().(string))
fmt.Printf("i:%s value:%s \n", i, object.Path("avg").ToString())
fmt.Printf("i:%s value:%s \n", i, object.Path("avg").ToInt())
fmt.Printf("i:%s value:%s \n", i, object.GetString("avg"))
}
func (*EJson) GetArrayCount ¶
func (*EJson) LoadFromJsonFile ¶
func (*EJson) LoadFromJsonString ¶
Click to show internal directories.
Click to hide internal directories.