Documentation
¶
Overview ¶
Json util
Jsonpath util ¶
Param util
Index ¶
- func AddParamInt(m map[string]any, key string, value int, targetType definition.ParamType) error
- func AddParamString(m map[string]any, key string, value string, targetType definition.ParamType) error
- func JsonMarshal(v any) (*json.RawMessage, error)
- func JsonUnmarshal(data []byte, v any) error
- func ParseJsonPath(input *json.RawMessage, path string) (*json.RawMessage, error)
- func ParseJsonPathList(input *json.RawMessage, path string, bObjAsList bool) ([]*json.RawMessage, error)
- func ParseJsonPathStr(input *json.RawMessage, path string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddParamInt ¶
AddParamInt: Insert a int into map[string]any as targetType
func AddParamString ¶
func AddParamString(m map[string]any, key string, value string, targetType definition.ParamType) error
AddParamString: Insert a string into map[string]any as targetType
func JsonMarshal ¶
func JsonMarshal(v any) (*json.RawMessage, error)
JsonMarshal: Convert interface{} to *json.RawMessage
func JsonUnmarshal ¶
JsonUnmarshal: Unmarshal json string and treat number as json.Number
func ParseJsonPath ¶
func ParseJsonPath(input *json.RawMessage, path string) (*json.RawMessage, error)
func ParseJsonPathList ¶
func ParseJsonPathList(input *json.RawMessage, path string, bObjAsList bool) ([]*json.RawMessage, error)
ParseJsonPathList: Parse JsonPath and try to return the result as a list
func ParseJsonPathStr ¶
func ParseJsonPathStr(input *json.RawMessage, path string) (string, error)
ParseJsonPathStr: Parse JsonPath and try to convert result to single string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.