Releases: rnag/serde-this-or-that
Releases · rnag/serde-this-or-that
v0.5.0
Release Notes
Features
-
Added support for optional deserialization:
- New functions were introduced to handle
Option<T>
types during deserialization:as_opt_bool
– ReturnsOption<bool>
.as_opt_f64
– ReturnsOption<f64>
.as_opt_i64
– ReturnsOption<i64>
.as_opt_string
– ReturnsOption<String>
.as_opt_u64
– ReturnsOption<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 appropriateSome(T)
. - New functions were introduced to handle
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 toNone
, making the handling of nulls more consistent with Serde's
standard
behavior.
Breaking Changes
- No breaking changes introduced in this version.
What's Changed
Full Changelog: v0.4.2...v0.5.0
v0.4.2
v0.4.1
Release Notes
Bug Fixes
- Fix readme badge, as per badges/shields#8671.
What's Changed
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Release Notes
Features
- Add benchmarks to compare performance against
serde_with
. - Flatten some nested
match
arms into simplerif
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.
- Update to check for a new "truthy" string value of
serde_this_or_that
is now on par - in terms of performance - withserde_with
! This is
truly great news.
Full Changelog: v0.3.1...v0.4.0
v0.3.1
v0.3.0
Release Notes
Breaking Changes
- Remove dependency on the
derive
feature ofserde
- Add it as an optional feature named
derive
instead.
- Add it as an optional feature named
Features
- Replace
utilities
keyword withthis-or-that
, as I want crate to be
searchable when someone types "this or that". - Update docs.
What's Changed
New Contributors
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Release Notes
Features
- Add
as_string
helper function, to coerce values to an ownedString
type. - Update to handle empty strings and
null
values in JSON (should be deserialized as "zero" values). - Round
floats
when converting tou64
ori64
. - Similarly, handle floating-point values in strings when converting to
u64
ori64
. - Refactor to use
Result<Self::Value, E>
everywhere, instead ofResult<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
v0.1.0
Release Notes
- Initial Release on crates.io 🎉
Full Changelog: https://github.com/rnag/serde-this-or-that/commits/v0.1.0