Skip to content

Releases: jonasbb/serde_with

serde_with v3.22.0

Choose a tag to compare

@github-actions github-actions released this 09 Aug 12:48
v3.22.0
88f576a

Added

  • Add support for jiff v0.2 behind the new jiff_0_2 feature flag (#936)
    jiff::SignedDuration works with DurationSeconds and its variants.
    jiff::Timestamp, jiff::Zoned, and jiff::civil::DateTime work with TimestampSeconds and its variants.
    Deserializing a jiff::Zoned uses the system time zone, like chrono::DateTime<Local>.

Fixed

  • Extend the GHSA-7gcf-g7xr-8hxj fix to the duplicate-key-prevention collections.
    The rust::sets_duplicate_value_is_error, rust::maps_duplicate_key_is_error, rust::sets_last_value_wins, and rust::maps_first_key_wins adapters created their backing sets/maps with with_capacity_and_hasher using the raw deserializer size_hint, bypassing the size_hint_cautious cap added in #966 (the clippy.toml disallowed_methods lint only covers Vec::with_capacity, not with_capacity_and_hasher, so these sites were not flagged).
    Attacker-controlled input claiming a huge length could panic with Hash table capacity overflow before a single element was read. All such constructions now route through size_hint_cautious.

serde_with v3.21.0

Choose a tag to compare

@github-actions github-actions released this 04 Jun 18:58
v3.21.0
0f4ca67

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 like Vec or sets.

    Thanks to @7thParkk for reporting the issue.

Added

  • Add NoneAsZero adapter that maps Option<NonZero*> to a plain integer, encoding None as 0 by @SAY-5 (#486)

Changed

  • Re-enable link-to-definition on docs.rs (#964)

Fixed

  • Fix some doc links to point to the correct types (#963)
  • Re-enable unused_qualifications and fix the resulting findings by @lms0806 (#962)

serde_with v3.20.0

Choose a tag to compare

@github-actions github-actions released this 10 May 19:53
v3.20.0
f1b06c7

Added

  • Add support for base58 encoding, similar to the existing base64 setup by @mitinarseny (#943)

Fixed

  • Extend base64 with schemars support by @mitinarseny (#9949)

serde_with v3.19.0

Choose a tag to compare

@github-actions github-actions released this 02 May 22:20
v3.19.0
b4cbda0

Added

  • Add support for hashbrown v0.17 (#940)

    This extends the existing support for hashbrown to the newly released version.

serde_with v3.18.0

Choose a tag to compare

@github-actions github-actions released this 13 Mar 21:23
v3.18.0
d50ec96

Added

  • Support OneOrMany with more sequence and set types (#929)

Changed

  • Bump MSRV to 1.88 due to the darling dependency

serde_with v3.17.0

Choose a tag to compare

@github-actions github-actions released this 25 Feb 00:04
v3.17.0
4031878

Added

  • Support OneOrMany with smallvec v1 (#920, #922)

Changed

  • Switch to yaml_serde for a maintained yaml dependency by @kazan417 (#921)
  • Bump MSRV to 1.82, since that is required for yaml_serde dev-dependency.

serde_with v3.16.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 23:42
v3.16.1
8513323

Fixed

  • Fix JsonSchemaAs of SetPreventDuplicates and SetLastValueWins. (#906, #907)

serde_with v3.16.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 23:46
v3.16.0
066b9d4

Added

  • Added support for smallvec v1 under the smallvec_1 feature flag by @isharma228 (#895)
  • Add JsonSchemaAs implementation for json::JsonString by @yogevm15 (#901)

serde_with v3.15.1

Choose a tag to compare

@github-actions github-actions released this 21 Oct 23:17
v3.15.1
d5ccc10

Fixed

  • Fix building of the documentation by updating references to use serde_core.

serde_with v3.15.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 14:03
v3.15.0
ea38dce

Added

  • Added error inspection to VecSkipError and MapSkipError by @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!.
    The serde_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 hashbrown v0.16 (#877)

    This extends the existing support for hashbrown v0.14 and v0.15 to the newly released version.

Changed

  • Bump MSRV to 1.76, since that is required for toml dev-dependency.