Releases: jonasbb/serde_with
Releases · jonasbb/serde_with
serde_with v3.11.0
serde_with v3.10.0
serde_with v3.9.0
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
Fixed
- Fix compile issues when dependency
schemars_0_8
is used with thepreserve_order
features (#762)
serde_with v3.8.2
Changed
- Bump MSRV to 1.67, since that is required for the
time
dependency.
Thetime
version needed to be updated for nightly compatibility.
Fixed
- Implement
JsonSchemaAs
forOneOrMany
instead ofJsonSchema
by @swlynch99 (#760)
serde_with v3.8.1
serde_with v3.8.0
Added
- Implement (De)Serialization for Pinned Smart Pointers by @Astralchroma (#733)
- Implement
JsonSchemaAs
forPickFirst
by @swlynch99 (#721)
Changed
- Bump
base64
dependency to v0.22 (#724) - Update dev dependencies
Fixed
serde_conv
regressed and triggeredclippy::ptr_arg
and add test to prevent future problems. (#731)
serde_with v3.7.0
Added
- Implement
JsonSchemaAs
forEnumMap
by @swlynch99 (#697) - Implement
JsonSchemaAs
forIfIsHumanReadable
by @swlynch99 (#717) - Implement
JsonSchemaAs
forKeyValueMap
by @swlynch99 (#713) - Implement
JsonSchemaAs
forOneOrMany
by @swlynch99 (#719)
Fixed
- Detect conflicting
schema_with
attributes on fields withschemars
annotations by @swlynch99 (#715)
This extends the existing avoidance mechanism to a new variant fixing #712.
serde_with v3.6.1
serde_with v3.6.0
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 allDuration*
andTimestamp*
adaptors by @swlynch99 (#685)
Changed
- Bump MSRV to 1.65, since that is required for the
regex
dependency.