Skip to main content

capture_jsonpath

Function capture_jsonpath 

Source
pub fn capture_jsonpath(spec: &CaptureSpec) -> Option<&str>
Expand description

Interpolate every string field of a capture spec against ctx and fail fast if any placeholders are still unresolved after substitution. This is the one place that decides capture expressions support {{ ... }}; keeping it at the edge of extraction means the JSONPath/regex/header parsers see only literal, validated input. Return the raw (uninterpolated) JSONPath string of a capture spec when the capture is JSONPath-based — either the shorthand CaptureSpec::JsonPath form or an extended capture that sets jsonpath:. Returns None for header / cookie / body / status / url sources. Used by the runner’s shape-drift diagnosis (NAZ-415) to pick a representative path without resolving interpolation.