CompilePath parses jsonPath once for reuse. SYS-REQ-114
(jsonPath string)
| 165 | // CompilePath parses jsonPath once for reuse. |
| 166 | // SYS-REQ-114 |
| 167 | func CompilePath(jsonPath string) (CompiledPath, error) { |
| 168 | parts, err := ParsePath(jsonPath) |
| 169 | if err != nil { |
| 170 | return CompiledPath{}, err |
| 171 | } |
| 172 | return CompiledPath{parts: parts}, nil |
| 173 | } |
| 174 | |
| 175 | // Get resolves the compiled path in data. |
| 176 | // Verifies: SYS-REQ-001 (Get) |