package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Jul 21, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package query wraps gojq: it compiles a jq expression once and runs it
over decoded record values.
FromJSON prepares raw JSON for querying, keeping numbers as json.Number
so long packed-decimal values do not lose precision on the way in.
Marshal renders one query output as compact JSON in jq's own encoding.
type Halt struct {
Value any
ExitCode int
}
Halt is returned by Run when the expression called halt or halt_error;
processing of further input should stop.
Query is a compiled jq expression.
Compile parses and compiles a jq expression.
Run evaluates the query against one input value and calls emit for each
result. Errors raised by the expression (including halt) abort the run.
RunContext evaluates like Run but honors ctx, so interactive callers can
bound a pathological expression instead of freezing.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.