Documentation
¶
Index ¶
- func MustMarshal(v interface{}) []byte
- func MustUnmarshal(data []byte, v interface{})
- func Pretty(v interface{}) []byte
- func RunJQ(jq *gojq.Query, data any) (any, error)
- func RunJQFloat(jq string, data string) (float64, error)
- func RunJQInt(jq string, data string) (int, error)
- func RunJQOnAny(jq string, data any) (any, error)
- func RunJQOnString(jq string, data string) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustUnmarshal ¶ added in v0.7.0
func MustUnmarshal(data []byte, v interface{})
MustUnmarshal must unmarshal json
func RunJQ ¶
RunJQ run jq on data. If the result is a single value, return the value. otherwise, return the array of values.
func RunJQFloat ¶
RunJQInt run jq on data and return the float64 value.
func RunJQOnAny ¶
RunJQOnAny run jq on data. If the result is a single value, return the value. otherwise, return the array of values. The input data must be a value that is unmarshalled from a valid json string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.