Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonq

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: AGPL-3.0 Imports: 3 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

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

Query is a JSON query interface

func New

func New(content string) *Query

New creates a new Query object based on given input as a JSON

func (*Query) ArrayLength added in v0.9.0

func (q *Query) ArrayLength() int

ArrayLength returns number of elements in the array

func (*Query) Contains

func (q *Query) Contains(selector string) bool

Contains returns true if the json object has the key

func (*Query) Int32 added in v0.10.0

func (q *Query) Int32(selector string) int

Int32 returns a integer value from the json object based on its selector

func (*Query) IsArray added in v0.9.0

func (q *Query) IsArray() bool

IsArray returns true if the json object is an array

func (*Query) String

func (q *Query) String(selector string) string

String returns a string value from the json object based on its selector

Jump to

Keyboard shortcuts

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