(base: &str, segment: &str)
| 447 | } |
| 448 | |
| 449 | fn join_path(base: &str, segment: &str) -> String { |
| 450 | if base == "/" { |
| 451 | format!("/{}", segment.trim_start_matches('/')) |
| 452 | } else { |
| 453 | format!( |
| 454 | "{}/{}", |
| 455 | base.trim_end_matches('/'), |
| 456 | segment.trim_start_matches('/') |
| 457 | ) |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | fn map_to_value(map: BTreeMap<String, Value>) -> Value { |
| 462 | let mut json_map = Map::new(); |