Documentation ¶
Overview ¶
Package pathfinder holds utilities for working with JSON path.
Package pathfinder holds utilities for working with different data formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AntchfxHTMLFinder ¶ added in v1.2.0
type AntchfxHTMLFinder struct{}
AntchfxHTMLFinder represents implementation of HTMLPath from https://github.com/antchfx/htmlquery
func NewAntchfxHTMLFinder ¶ added in v1.2.0
func NewAntchfxHTMLFinder() AntchfxHTMLFinder
type AntchfxJSONQueryFinder ¶ added in v1.2.0
type AntchfxJSONQueryFinder struct{}
AntchfxJSONQueryFinder represents implementation of JSON path from https://github.com/antchfx/jsonquery library
func NewAntchfxJSONQueryFinder ¶ added in v1.2.0
func NewAntchfxJSONQueryFinder() AntchfxJSONQueryFinder
type AntchfxXMLFinder ¶ added in v0.13.0
type AntchfxXMLFinder struct{}
AntchfxXMLFinder represents implementation of XPath from https://github.com/antchfx/xmlquery
func NewAntchfxXMLFinder ¶ added in v0.13.0
func NewAntchfxXMLFinder() AntchfxXMLFinder
type DynamicJSONPathFinder ¶
type DynamicJSONPathFinder struct {
// contains filtered or unexported fields
}
DynamicJSONPathFinder is entity that has ability to obtain data from JSON from given expression. Entity knows how to determine whether expression matches https://github.com/tidwall/gjson, https://github.com/oliveagle/jsonpath or https://github.com/antchfx/jsonquery syntax
func NewDynamicJSONPathFinder ¶
func NewDynamicJSONPathFinder(gjson GJSONFinder, oliveagleJSONFinder OliveagleJSONFinder, antchfxJSONQuery AntchfxJSONQueryFinder) *DynamicJSONPathFinder
type GJSONFinder ¶ added in v1.1.0
type GJSONFinder struct{}
GJSONFinder represents implementation of JSON path from https://github.com/tidwall/gjson library
func NewGJSONFinder ¶ added in v1.1.0
func NewGJSONFinder() GJSONFinder
type GoccyGoYamlFinder ¶
type GoccyGoYamlFinder struct{}
func NewGoccyGoYamlFinder ¶
func NewGoccyGoYamlFinder() GoccyGoYamlFinder
type OliveagleJSONFinder ¶
type OliveagleJSONFinder struct{}
OliveagleJSONFinder represents implementation of JSON path from https://github.com/oliveagle/jsonpath library
func NewOliveagleJSONFinder ¶
func NewOliveagleJSONFinder() OliveagleJSONFinder
type PathFinder ¶
type PathFinder interface { // Find obtains data from bytes according to given expression Find(expr string, bytes []byte) (any, error) }
PathFinder describes ability to obtain node(s) from data in fixed data format
type QJSONFinder ¶
type QJSONFinder struct{}
QJSONFinder represents implementation of JSON path from https://github.com/pawelWritesCode/qjson library
func NewQJSONFinder ¶
func NewQJSONFinder() QJSONFinder