json

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustMarshal

func MustMarshal(v interface{}) []byte

MustMarshal must marshal json

func MustUnmarshal added in v0.7.0

func MustUnmarshal(data []byte, v interface{})

MustUnmarshal must unmarshal json

func Pretty

func Pretty(v interface{}) []byte

Pretty pretty json

func RunJQ

func RunJQ(jq *gojq.Query, data any) (any, error)

RunJQ run jq on data. If the result is a single value, return the value. otherwise, return the array of values.

func RunJQFloat

func RunJQFloat(jq string, data string) (float64, error)

RunJQInt run jq on data and return the float64 value.

func RunJQInt

func RunJQInt(jq string, data string) (int, error)

RunJQInt run jq on data and return the int value.

func RunJQOnAny

func RunJQOnAny(jq string, data any) (any, error)

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.

func RunJQOnString

func RunJQOnString(jq string, data string) (any, error)

RunJQOnString 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 valid json string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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