jq

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 12 Imported by: 0 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

Overview

Package jq facilitates processing of JSON strings using jq expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileExpression

func CompileExpression(expr string) (*gojq.Code, error)

func Evaluate

func Evaluate(input io.Reader, output io.Writer, expr string) error

Evaluate a jq expression against an input and write it to an output. Any top-level scalar values produced by the jq expression are written out directly, as raw values and not as JSON scalars, similar to how jq --raw works.

func EvaluateData

func EvaluateData(expr string, data any) (any, error)

func EvaluateFormatted

func EvaluateFormatted(input io.Reader, output io.Writer, expr string, indent string, colorize bool) error

Evaluate a jq expression against an input and write it to an output, optionally with indentation and colorization. Any top-level scalar values produced by the jq expression are written out directly, as raw values and not as JSON scalars, similar to how jq --raw works.

Types

This section is empty.

Jump to

Keyboard shortcuts

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