Skip to content

Releases: jonasbb/serde_with

serde_with v3.14.0

30 Jun 17:20
v3.14.0
16ea265
Compare
Choose a tag to compare

Added

  • Add support for Range, RangeFrom, RangeTo, RangeInclusive (#851)
    RangeToInclusive is currently unsupported by serde.
  • Add schemars implementations for Bound, Range, RangeFrom, RangeTo, RangeInclusive.
  • Added support for schemars v1 under the schemars_1 feature flag

serde_with v3.13.0

14 Jun 14:59
v3.13.0
92ae7ad
Compare
Choose a tag to compare

Added

  • Added support for schemars v0.9.0 under the schemars_0_9 feature flag by @swlynch99 (#849)
  • Introduce SerializeDisplayAlt derive macro (#833)
    An alternative to the SerializeDisplay macro except instead of using the
    plain formatting like format!("{}", ...), it serializes with the
    Formatter::alternate flag set to true, like format!("{:#}", ...)

Changed

  • Generalize serde_with::rust::unwrap_or_skip to support deserializing references by @beroal (#832)
  • Bump MSRV to 1.71, since that is required for the jsonschema dev-dependency.
  • Make serde_conv available without the std feature by @arilou (#839)
  • Bump MSRV to 1.74, since that is required for schemars v0.9.0 by @swlynch99 (#849)

Fixed

  • Make the DurationSeconds types and other variants more accessible even without std (#845)

serde_with v3.12.0

25 Dec 22:01
v3.12.0
5de3400
Compare
Choose a tag to compare

Added

  • Add with_suffix! macro, which puts a suffix on every struct field by @fgardt (#381/#797)

Changed

  • Reformat all Cargo.toml files by @nyurik (#803)
  • Better handle internal arithmetic and improve error messages (#809/#810/#811)

Fixed

  • Generated schemas are not valid when using rust style names in ref by @waltronix (#798/#799)

serde_with v3.11.0

05 Oct 20:14
v3.11.0
bc20634
Compare
Choose a tag to compare

Added

  • Add support for hashbrown v0.15 (#787/#790)

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

serde_with v3.10.0

01 Oct 18:49
v3.10.0
f1b79f2
Compare
Choose a tag to compare

Added

  • Add newline separator by @jayvdb (#777)

    The UnixLineSeparator and DosLineSeparator can be used together with StringWithSeparator.

Fixed

  • Proper handling of cfg_attr in the serde_as macro by @sivizius (#782)

    This allows to parse more valid forms of the cfg_attr macro, including multiple values and attribute that do not follow the key = value schema.

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)