Parse PostgreSQL array path format '{key1,key2}' into Vec
(path_str: &str)
| 1219 | |
| 1220 | /// Parse PostgreSQL array path format '{key1,key2}' into Vec<String> |
| 1221 | fn parse_json_path(path_str: &str) -> Vec<String> { |
| 1222 | let trimmed = path_str.trim(); |
| 1223 | if trimmed.starts_with('{') && trimmed.ends_with('}') { |
| 1224 | let inner = &trimmed[1..trimmed.len()-1]; |
| 1225 | inner.split(',').map(|s| s.trim().to_string()).collect() |
| 1226 | } else { |
| 1227 | vec![trimmed.to_string()] |
| 1228 | } |
| 1229 | } |
| 1230 | |
| 1231 | /// Set value at path in JSON |
| 1232 | fn set_json_value(json: &mut JsonValue, path: &[String], new_value: JsonValue) { |
no test coverage detected