Documentation
¶
Index ¶
- func FileToJsonMap(path string) (result map[string]interface{})
- func FileToJsonObject(path string, object interface{})
- func GetValueWithKeyFromFile(path string, key string) string
- func JsonSliceToLineFile(path string, datas interface{}) bool
- func JsonToFile(path string, data interface{}) bool
- func JsonToFileFormat(path string, data interface{}) bool
- func JsonToLineFile(path string, data interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileToJsonMap ¶
读取标准json格式,返回map
func FileToJsonObject ¶
func FileToJsonObject(path string, object interface{})
读取标准josn格式,返回 object 传入: &object
func GetValueWithKeyFromFile ¶
根据key从json文件中读取value
func JsonSliceToLineFile ¶
将结构体切片逐行写入到文件 datas: [{a:"1"},{b:"2"}] 文件中: {a:"1"} {b:"2"}
func JsonToFileFormat ¶
将json格式化后写入到文件,标准json格式
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.