summaryrefslogtreecommitdiffstats
path: root/pkg/jsonpath/jsonpath.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/jsonpath/jsonpath.go')
-rw-r--r--pkg/jsonpath/jsonpath.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/jsonpath/jsonpath.go b/pkg/jsonpath/jsonpath.go
index 7ed9b16..6b11660 100644
--- a/pkg/jsonpath/jsonpath.go
+++ b/pkg/jsonpath/jsonpath.go
@@ -26,6 +26,7 @@ import (
type JSONPath struct {
name string
+ String string
parser *Parser
stack [][]reflect.Value // push and pop values in different scopes
cur []reflect.Value // current scope values
@@ -56,6 +57,7 @@ func (j *JSONPath) AllowMissingKeys(allow bool) *JSONPath {
// Parse parses the given template and returns an error.
func (j *JSONPath) Parse(text string) error {
var err error
+ j.String = text
j.parser, err = Parse(j.name, text)
return err
}