jq

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(r, e string, o bool) (bool, error)

Compare two JSON strings using the "jq --argjson" command-line tool.

func Extract

func Extract(o, q string) (string, error)

Extract (select sub-objects) a JSON string using the "jq -rc" command-line tool. similar to filter function but this returns raw format of JSON string.

func Filter

func Filter(j string, q string) (string, error)

Filter (select sub-objects) a JSON string using the "jq -c" command-line tool.

func Format

func Format(j string) (string, error)

Format a JSON string using the "jq -s" command-line tool.

func Replace

func Replace(o, q, d string) (string, error)

Replace a portion of a JSON string using the "jq" command-line tool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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