Update Rust crate serde_yaml to 0.9.4 #29
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/serde_yaml-0.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.8.23->0.9.4Release Notes
dtolnay/serde-yaml
v0.9.4Compare Source
serde_yaml::with::singleton_mapfor serialization of enums as a 1-entry map (#300)MappingorValue(#301)v0.9.3Compare Source
v0.9.2Compare Source
Debugrepresentation ofserde_yaml::Errorv0.9.1Compare Source
v0.9.0Compare Source
API documentation: https://docs.rs/serde_yaml/0.9
Highlights
The
serde_yaml::Valueenum gains aTaggedvariant which represents the deserialization of YAML's!Tagsyntax. Tagged scalars, sequences, and mappings are all supported.An empty YAML input (or document containing only comments) will deserialize successfully to an empty map, empty sequence, or Serde struct as long as the struct has only optional fields. Previously this would error.
A new
.apply_merge()method onValueimplements YAML's<<merge key convention.The
Debugrepresentation ofserde_yaml::Valuehas gotten vastly better (https://github.com/dtolnay/serde-yaml/pull/287).Deserialization of borrowed strings now works.
Value's andMapping's methodsgetandget_muthave been generalized to support a &str argument, as opposed to requiring you to allocate and construct aValue::Stringfor indexing into another existingValue.Mappingexposes more APIs that have become conventional on map data structures, such as.keys(),.values(),.into_keys(),.into_values(),.values_mut(), and.retain(|k, v| …).Breaking changes
Serialization no longer produces leading
---\non the serialized output. You can prepend this yourself if your use case demands it.Serialization of enum variants is now based on YAML's
!Tagsyntax, rather than JSON-style singleton maps.A bunch of non-base-10 edge cases in number parsing have been resolved. For example
0x+1and++0x1are now parsed as strings, whereas they used to be incorrectly treated as numbers.Deserializers obtained through iteration can no longer be iterated further:
The abandoned yaml-rust crate is no longer used as the YAML backend. The new libyaml-based backend surely has different edge cases and quirks than yaml-rust.
Some excessive
PartialEqimpls have been eliminated.The
serde_yaml::to_vecfunction has been removed. Useserde_yaml::to_writerfor doing I/O, or useserde_yaml::to_string+.into_bytes()on the resulting String.The
serde_yaml::seedmodule has been removed. Now that aserde_yaml::Deserializeris publicly available, the same use cases can be addressed viaseed.deserialize(Deserializer::from_str(…))instead.Bugfixes
Empty values in a mapping are supported, and deserialize to empty string when the corresponding struct field is of type string. Previously they would deserialize to "~" which makes no sense.
128-bit integer deserialization now supports hex and octal input.
Serde_yaml now includes a mitigation against a "billion laughs" attack in which malicious input involving YAML anchors and aliases is used to consume an amount of processing or memory that is exponential in the size of the input document. Serde_yaml will quickly produce an error in this situation instead.
v0.8.26Compare Source
flushmethod to Serializer (#251, thanks @jturner314-nrl)v0.8.25Compare Source
v0.8.24Compare Source
indexmap/autocfgnot always properly detecting whether astdsysroot crate is available (#243, thanks @cuviper)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
Update Rust crate serde_yaml to 0.9.2to Update Rust crate serde_yaml to 0.9.4cee342508ftoecfa1a357a