jq

package module
v0.0.0-...-ed2a25b Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

README

JQ bindings for Go

The original repo doesn't move much: mgood/go-jq **Here we merge the various fixes.

This library implements bindings to the "jq" JSON processor from Go:

http://stedolan.github.io/jq/

The code is in a very early state, and not ready for production use. There are passing tests covering conversion between Go and JQ's internal JSON structures, and basic JSON query processing, but it does almost no error handling, and almost certainly contains memory leaks due to the allocation of objects in C.

There are a few other JQ bindings for Go, in various states:

This library attempts to convert directly between Go data structures and JQ's internal C data structures instead of an intermediate JSON serialization.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JQ

type JQ struct {
	// contains filtered or unexported fields
}

func NewJQ

func NewJQ(program string) (*JQ, error)

func (*JQ) Close

func (jq *JQ) Close()

func (*JQ) Handle

func (jq *JQ) Handle(value interface{})

func (*JQ) HandleJson

func (jq *JQ) HandleJson(text string) error

func (*JQ) Next

func (jq *JQ) Next() bool

func (*JQ) Value

func (jq *JQ) Value() interface{}

func (*JQ) ValueJson

func (jq *JQ) ValueJson() string

func (*JQ) ValueString

func (jq *JQ) ValueString() string

Jump to

Keyboard shortcuts

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