9 unstable releases (3 breaking)
0.4.3 | Dec 5, 2024 |
---|---|
0.4.2 | Oct 25, 2024 |
0.4.1 | Aug 23, 2024 |
0.4.0 | Jul 24, 2024 |
0.1.2 | Mar 13, 2024 |
#217 in Configuration
157 downloads per month
Used in openapi-trustfall-adapter
11KB
103 lines
Improved YAML Hash
If the YAML data you're working with is well-defined and you want to write the necessary types, you
should use serde
and serde_yaml
.
Otherwise, yaml_rust2
provides a foundation for working with varied YAML data or when you don't
want to write the necessary types.
This crate provides the YamlHash
struct, which is a wrapper for yaml_rust2::yaml::Hash
, and
supports some additional capabilities:
- Convert from
&str
viaimpl From<&str>
- Convert to
String
viaimpl Display
- Get a value for a dotted key as a
YamlHash
oryaml_rust2::Yaml
viaget
andget_yaml
; return the root hash if the key is""
. - Merge a
YamlHash
with anotherYamlHash
, YAML hash string, or YAML hash file to create a newYamlHash
viamerge
,merge_str
, ormerge_file
Dependencies
~2MB
~35K SLoC