Documentation
¶
Overview ¶
package provides a lightweight interface for querying and filter JSON documents using tidwall/gjson-style paths and regular expressions for testing values.
Index ¶
Constants ¶
const QUERYSET_MODE_ALL string = "ALL"
QUERYSET_MODE_ALL is a flag to signal that only all matches in a QuerySet needs to be successful.
const QUERYSET_MODE_ANY string = "ANY"
QUERYSET_MODE_ANY is a flag to signal that only one match in a QuerySet needs to be successful.
const SEP string = "="
The separator string used to distinguish {PATH}={REGULAR_EXPRESSION} strings.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Query ¶
type Query struct { // A valid tidwall/gjson query path. Path string // A valid regular expression. Match *regexp.Regexp }
Query is an atomic query to perform against a JSON document.
type QueryFlags ¶
type QueryFlags []*Query
QueryFlags holds one or more Query instances that are created using {PATH}={REGULAR_EXPRESSION} strings.
func (*QueryFlags) Set ¶
func (m *QueryFlags) Set(value string) error
Parse a {PATH}={REGULAR_EXPRESSION} string and store it as one of a set of Query instances.
func (*QueryFlags) String ¶
func (m *QueryFlags) String() string
Return the string value of the set of Query instances. Currently returns "".