Releases: jonasbb/serde_with
Release list
serde_with v3.22.0
Added
- Add support for
jiffv0.2 behind the newjiff_0_2feature flag (#936)
jiff::SignedDurationworks withDurationSecondsand its variants.
jiff::Timestamp,jiff::Zoned, andjiff::civil::DateTimework withTimestampSecondsand its variants.
Deserializing ajiff::Zoneduses the system time zone, likechrono::DateTime<Local>.
Fixed
- Extend the GHSA-7gcf-g7xr-8hxj fix to the duplicate-key-prevention collections.
Therust::sets_duplicate_value_is_error,rust::maps_duplicate_key_is_error,rust::sets_last_value_wins, andrust::maps_first_key_winsadapters created their backing sets/maps withwith_capacity_and_hasherusing the raw deserializersize_hint, bypassing thesize_hint_cautiouscap added in #966 (theclippy.tomldisallowed_methodslint only coversVec::with_capacity, notwith_capacity_and_hasher, so these sites were not flagged).
Attacker-controlled input claiming a huge length could panic withHash table capacity overflowbefore a single element was read. All such constructions now route throughsize_hint_cautious.
serde_with v3.21.0
Security
-
GHSA-7gcf-g7xr-8hxj: KeyValueMap serialization panics on empty sequence or map entries
Bad or attacker controlled values could cause a panic while allocating too large values.
Fixed in #966 by setting a maximum allocation size during the creation of collections likeVecor sets.Thanks to @7thParkk for reporting the issue.
Added
- Add
NoneAsZeroadapter that mapsOption<NonZero*>to a plain integer, encodingNoneas0by @SAY-5 (#486)
Changed
- Re-enable link-to-definition on docs.rs (#964)
Fixed
serde_with v3.20.0
Added
- Add support for
base58encoding, similar to the existingbase64setup by @mitinarseny (#943)
Fixed
- Extend
base64withschemarssupport by @mitinarseny (#9949)
serde_with v3.19.0
Added
-
Add support for
hashbrownv0.17 (#940)This extends the existing support for
hashbrownto the newly released version.
serde_with v3.18.0
Added
- Support
OneOrManywith more sequence and set types (#929)
Changed
- Bump MSRV to 1.88 due to the
darlingdependency
serde_with v3.17.0
serde_with v3.16.1
serde_with v3.16.0
Added
- Added support for
smallvecv1 under thesmallvec_1feature flag by @isharma228 (#895) - Add
JsonSchemaAsimplementation forjson::JsonStringby @yogevm15 (#901)
serde_with v3.15.1
Fixed
- Fix building of the documentation by updating references to use
serde_core.
serde_with v3.15.0
Added
-
Added error inspection to
VecSkipErrorandMapSkipErrorby @michelhe (#878)
This allows interacting with the previously hidden error, for example for logging.
Checkout the newly added example to both types. -
Allow documenting the types generated by
serde_conv!.
Theserde_conv!macro now acceps outer attributes before the optional visibility modifier.
This allow adding doc comments in the shape of#[doc = "..."]or any other attributes, such as lint modifiers.serde_conv!( #[doc = "Serialize bools as string"] #[allow(dead_code)] pub BoolAsString, bool, |x: &bool| ::std::string::ToString::to_string(x), |x: ::std::string::String| x.parse() );
-
Add support for
hashbrownv0.16 (#877)This extends the existing support for
hashbrownv0.14 and v0.15 to the newly released version.
Changed
- Bump MSRV to 1.76, since that is required for
tomldev-dependency.