AllowMissingKeys allows a caller to specify whether they want an error if a field or map key cannot be located, or simply an empty result. The receiver is returned for chaining.
(allow bool)
| 51 | // AllowMissingKeys allows a caller to specify whether they want an error if a field or map key |
| 52 | // cannot be located, or simply an empty result. The receiver is returned for chaining. |
| 53 | func (j *JSONPath) AllowMissingKeys(allow bool) *JSONPath { |
| 54 | j.allowMissingKeys = allow |
| 55 | return j |
| 56 | } |
| 57 | |
| 58 | // Parse parses the given template and returns an error. |
| 59 | func (j *JSONPath) Parse(text string) error { |