This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
0.5.0
Breaking changes in 0.5.0
- Real numbers written in YAML are now deserialized through
visit_f64
rather thanvisit_str
; this may affect custom Deserialize implementations that expect to process real numbers as strings (#24, thanks @jwilm) serde_yaml::to_writer
no longer flushes the writer after writing; the caller is responsible for flushing if necessary (#29, thanks @emk)serde_yaml::Value
is no longer the same type asyaml_rust::Yaml
- Order of map keys is preserved where before they were sorted alphanumerically; this means that deserializing from YAML to
serde_yaml::Value
and writing back to YAML will preserve the order of keys in the input, and also serializing a struct to YAML will produce keys in the same order as the fields in the struct
Enhancements
The new serde_yaml::Value
implements the Serde Serialize
and Deserialize
traits, similar to serde_json::Value
. This allows structs to be deserialized containing values of any type (#23, thanks @andrewrynhard).
#[derive(Serialize, Deserialize)]
pub struct GenericInstructions {
#[serde(rename = "type")]
pub typ: String,
pub config: Value,
}