(value: &'a serde_json::Value, path: &str)
| 42 | } |
| 43 | |
| 44 | fn navigate_json<'a>(value: &'a serde_json::Value, path: &str) -> Option<&'a serde_json::Value> { |
| 45 | if path.is_empty() { |
| 46 | return Some(value); |
| 47 | } |
| 48 | let mut current = value; |
| 49 | for segment in path.split('.') { |
| 50 | current = current.get(segment)?; |
| 51 | } |
| 52 | Some(current) |
| 53 | } |
| 54 | |
| 55 | fn navigate_rmpv<'a>(value: &'a rmpv::Value, path: &str) -> Option<&'a rmpv::Value> { |
| 56 | if path.is_empty() { |
no test coverage detected