Validate walks the Jsonpath AST. It returns an error if the AST is invalid (last not in array subscripts, @ in root expressions).
()
| 24 | // Validate walks the Jsonpath AST. It returns an error if the AST is invalid |
| 25 | // (last not in array subscripts, @ in root expressions). |
| 26 | func (j Jsonpath) Validate() error { |
| 27 | return j.Path.Validate(0 /* nestingLevel */, false /* insideArraySubscript */) |
| 28 | } |