Skip to main content

json_get_object_path

Function json_get_object_path 

Source
fn json_get_object_path(expr: &Expr) -> Option<Vec<String>>
Expand description

Resolves json_get’s second argument expression (the path) to object field names for type hint lookup. For example, the string literal '$.user.age' resolves to ["user", "age"].

Returns None for non-string literals, non-literal expressions, invalid JSONPaths, or paths containing array indexes, wildcards, or filters. Returning None only skips hint injection; the original json_get expression is preserved.