token

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokenize

func Tokenize(selector string) ([]string, error)

Tokenize converts a JSON Path selector to a collection of parsable tokens

Types

type Token

type Token interface {
	Apply(root, current interface{}, next []Token) (interface{}, error)
	String() string
	Type() string
}

Token represents a component of a JSON Path selector

func Parse

func Parse(tokenString string, engine script.Engine, options *option.QueryOptions) (Token, error)

Parse will parse a single token string and return an actionable token

Jump to

Keyboard shortcuts

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