Skip to content

Releases: jonasbb/serde_with

serde_with v3.9.0

14 Jul 20:13
v3.9.0
c3e489f
Compare
Choose a tag to compare

Added

  • Deserialize a map` and skip all elements failing to deserialize by @johnmave126 (#763)

    MapSkipError acts like a map (HashMap/BTreeMap), but keys or values that fail to deserialize, like are ignored.

    For formats with heterogeneously typed maps, we can collect only the elements where both key and value are deserializable.
    This is also useful in conjunction to #[serde(flatten)] to ignore some entries when capturing additional fields.

    // JSON
    "value": {"0": "v0", "5": "v5", "str": "str", "10": 2},
    
    // Rust
    #[serde_as(as = "MapSkipError<DisplayFromStr, _>")]
    value: BTreeMap<u32, String>,
    
    // Only deserializes entries with a numerical key and a string value, i.e.,
    {0 => "v0", 5 => "v5"}
    

serde_with v3.8.3

03 Jul 22:18
v3.8.3
1c4b022
Compare
Choose a tag to compare

Fixed

  • Fix compile issues when dependency schemars_0_8 is used with the preserve_order features (#762)

serde_with v3.8.2

30 Jun 23:09
v3.8.2
2274dd1
Compare
Choose a tag to compare

Changed

  • Bump MSRV to 1.67, since that is required for the time dependency.
    The time version needed to be updated for nightly compatibility.

Fixed

  • Implement JsonSchemaAs for OneOrMany instead of JsonSchema by @swlynch99 (#760)

serde_with v3.8.1

28 Apr 20:34
v3.8.1
29ea916
Compare
Choose a tag to compare

Fixed

  • Do not emit schemars(deserialize_with = "...") annotations, as schemars does not support them (#735)
    Thanks to @sivizius for reporting the issue.

serde_with v3.8.0

24 Apr 22:42
v3.8.0
7e66d6b
Compare
Choose a tag to compare

Added

Changed

  • Bump base64 dependency to v0.22 (#724)
  • Update dev dependencies

Fixed

  • serde_conv regressed and triggered clippy::ptr_arg and add test to prevent future problems. (#731)

serde_with v3.7.0

11 Mar 21:53
v3.7.0
bcda3fa
Compare
Choose a tag to compare

Added

Fixed

  • Detect conflicting schema_with attributes on fields with schemars annotations by @swlynch99 (#715)
    This extends the existing avoidance mechanism to a new variant fixing #712.

serde_with v3.6.1

08 Feb 23:45
v3.6.1
76cf252
Compare
Choose a tag to compare

Changed

  • Eliminate dependency on serde's "derive" feature by @dtolnay (#694)
    This allows parallel compilation of serde and serde_derive which can speed up the wallclock time.
    It requires that downstream crates do not use the "derive" feature either.

serde_with v3.6.0

30 Jan 22:03
v3.6.0
1be8fa3
Compare
Choose a tag to compare

Added

  • Add IfIsHumanReadable for conditional implementation by @irriden (#690)
    Used to specify different transformations for text-based and binary formats.
  • Add more JsonSchemaAs impls for all Duration* and Timestamp* adaptors by @swlynch99 (#685)

Changed

  • Bump MSRV to 1.65, since that is required for the regex dependency.

serde_with v3.5.1

23 Jan 20:42
v3.5.1
88e9879
Compare
Choose a tag to compare

Fixed

  • The serde_as macro now better detects existing schemars attributes on fields and incorporates them by @swlynch99 (#682)
    This avoids errors on existing #[schemars(with = ...)] annotations.

serde_with v3.5.0

20 Jan 23:59
v3.5.0
6ecde3c
Compare
Choose a tag to compare

Added

  • Support for schemars integration added by @swlynch99 (#666)
    The support uses a new Schema top-level item which implements JsonSchema
    The serde_as macro can now detect schemars usage and emits matching annotations for all fields with serde_as attribute.
    Many types of this crate come already with support for the schemars, but support is not complete and will be extended over time.