jsonq

package
v0.0.0-...-acda5ee Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

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

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

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

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

func (*Query) IsArray

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