Skip to content

Releases: rnag/serde-this-or-that

v0.5.0

25 Jan 05:32
v0.5.0
ac0eccd
Compare
Choose a tag to compare

Release Notes

Features

  • Added support for optional deserialization:

    • New functions were introduced to handle Option<T> types during deserialization:
      • as_opt_bool – Returns Option<bool>.
      • as_opt_f64 – Returns Option<f64>.
      • as_opt_i64 – Returns Option<i64>.
      • as_opt_string – Returns Option<String>.
      • as_opt_u64 – Returns Option<u64>.

    These functions ensure that null values in the JSON input or deserialization errors are correctly deserialized into
    None,
    while valid values will
    return the appropriate Some(T).

Bug Fixes

  • Resolved an issue where the existing deserialization functions did not handle Option<T> types, only direct types.
    Now,
    null values and errors are deserialized to None, making the handling of nulls more consistent with Serde's
    standard
    behavior.

Breaking Changes

  • No breaking changes introduced in this version.

What's Changed

  • Export as_opt_<type> helper functions by @rnag in #5

Full Changelog: v0.4.2...v0.5.0

v0.4.2

06 Feb 00:06
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Fix Clippy warnings in the build workflow.

Full Changelog: v0.4.1...v0.4.2

v0.4.1

05 Feb 23:39
Compare
Choose a tag to compare

Release Notes

Bug Fixes

What's Changed

  • V0.4.0 perf improvements by @rnag in #3

Full Changelog: v0.4.0...v0.4.1

v0.4.0

18 Apr 04:14
Compare
Choose a tag to compare

Release Notes

Features

  • Add benchmarks to compare performance against serde_with.
  • Flatten some nested match arms into simpler if statements.
  • Update as_bool
    • Update to check for a new "truthy" string value of ON.
    • Add pattern matching to check common true/false values before converting the string
      to uppercase, which should make it overall more efficient.
  • serde_this_or_that is now on par - in terms of performance - with serde_with! This is
    truly great news.

Full Changelog: v0.3.1...v0.4.0

v0.3.1

17 Apr 18:22
Compare
Choose a tag to compare

Release Notes

  • Cleanup docs

Full Changelog: v0.3.0...v0.3.1

v0.3.0

17 Apr 18:14
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Remove dependency on the derive feature of serde
    • Add it as an optional feature named derive instead.

Features

  • Replace utilities keyword with this-or-that, as I want crate to be
    searchable when someone types "this or that".
  • Update docs.

What's Changed

  • v0.2.0: update to handle empty strings by @rnag in #1

New Contributors

  • @rnag made their first contribution in #1

Full Changelog: v0.2.0...v0.3.0

v0.2.0

17 Apr 13:15
Compare
Choose a tag to compare

Release Notes

Features

  • Add as_string helper function, to coerce values to an owned String type.
  • Update to handle empty strings and null values in JSON (should be deserialized as "zero" values).
  • Round floats when converting to u64 or i64.
  • Similarly, handle floating-point values in strings when converting to u64 or i64.
  • Refactor to use Result<Self::Value, E> everywhere, instead of Result<T, E>.
  • Rename de.rs -> de_impl.rs to avoid name conflicts.
  • Add example as_string.rs
  • Update examples/
  • Update docs

Full Changelog: v0.1.1...v0.2.0

v0.1.1

16 Apr 15:26
Compare
Choose a tag to compare

Release Notes

  • Fix docs

Full Changelog: v0.1.0...v0.1.1

v0.1.0

16 Apr 15:10
Compare
Choose a tag to compare

Release Notes

Full Changelog: https://github.com/rnag/serde-this-or-that/commits/v0.1.0