jsonutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package jsonutil provides a jq-style JSON query engine. It supports dot-notation field access, array indexing, wildcards, recursive descent, and pipe-based filter chaining on JSON data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilter

func ApplyFilter(input any, filter string) ([]any, error)

ApplyFilter applies a jq-like filter expression to parsed JSON data. This is the core filter engine that operates on already-parsed Go values.

func Query

func Query(data []byte, filter string) ([]byte, error)

Query applies a jq-like filter to raw JSON data and returns the result as JSON bytes.

func QueryReader

func QueryReader(r io.Reader, filter string) ([]byte, error)

QueryReader applies a jq-like filter to JSON from an io.Reader.

func QueryString

func QueryString(jsonStr, filter string) (string, error)

QueryString applies a jq-like filter to a JSON string and returns the result as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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