gjson_util

package
v0.0.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidValueTypeInJson = "invalid value type in json"
)

Functions

func GetArray added in v0.0.36

func GetArray(data, path string) ([]gjson.Result, error)

func GetBool

func GetBool(data, path string) (bool, error)

func GetFloat

func GetFloat(data, path string) (float64, error)

func GetInt

func GetInt(data, path string) (int64, error)

只有一定为数字时才能获取到, "123"也是非法的

func GetString

func GetString(data, path string) (string, error)

func GetStringArr

func GetStringArr(data, path string) (result []string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL