Releases: jonasbb/serde_with
serde_with_macros v1.4.1
Fixed
- Fix compiling when having a struct field without the
serde_as
annotation.
This broke in 1.4.0 #267
serde_with v1.6.3
Changed
- Bump macro crate dependency (
serde_with_macros
) to 1.4.0 to pull in those improvements.
serde_with_macros v1.4.0
Changed
-
Improve error messages when
#[serde_as(..)]
is misused as a field attribute.
Thanks to @Lehona for reporting the bug in #233. -
Internal cleanup for assembling and parsing attributes during
serde_as
processing. -
Change processing on
#[serde_as(...)]
attributes on fields.The attributes will no longer be stripped during proc-macro processing.
Instead, a private derive macro is applied to the struct/enum which captures them and makes them inert, thus allowing compilation.This should have no effect on the generated code and on the runtime behavior.
It eases integration of third-party crates withserde_with
, since they can now process the#[serde_as(...)]
field attributes reliably.
Before this was impossible for derive macros and lead to akward ordering constraints on the attribute macros.Thanks to @Lehona for reporting this problem and to @dtolnay for suggesting the dummy derive macro.
serde_with v1.6.2
Added
-
New function
serde_with::rust::deserialize_ignore_any
.
This function allows deserializing any data and returns the default value of the type.
This can be used in conjunction with#[serde(other)]
to allow deserialization of unknown data carrying enum variants.Thanks to @lovasoa for suggesting and implementing it.
serde_with v1.6.1
Added
- Add new types similar to
DurationSeconds
andTimestampSeconds
but for base units of milliseconds, microseconds, and nanoseconds.
The*WithFrac
variants also exist. - Add
SerializeAs
implementation for references.
Changed
- Release
Sized
trait bound fromAs
,Same
,SerializeAs
, andSerializeAsWrap
.
Only the serialize part is relaxed.