Misc yaml-related utility functions.
If you use YAML for a configuration file, you might want to allow to use both things like:
yaml
compiler:
command: cargo build
and:
yaml
compiler.command: cargo build
(Or not. I know I needed that. Whatever.)
The functions restructure_map
and restructure_from_str
allow just that,
converting dotted keys to inner fiels:
```rust let s1 = r#" compiler: command: cargo build "#;
let s2 = r#"
compiler.command: cargo build "#; let v1: serdeyaml::Value = serdeyaml::fromstr(s1).unwrap(); let v2 = yamlextras::restructurefromstr(&s2, true).unwrap(); assert_eq!(v1, v2); ```
License: MPL-2.0