Add optional serde support
Closed this issue · 1 comments
TedDriggs commented
Right now, PackageUrl
doesn't implement serde::Serialize
or serde::Deserialize
, but does implement ToString
and FromStr
. To use PackageUrl
in a struct that is #[derive(Serialize)]
, someone needs to add the #[serde(with = "...")]
attribute.
Proposal: Add a serde
feature to packageurl
which lights up Serialize
and Deserialize
impls for PackageUrl
.
althonos commented
The new v0.3.0
release now derives Serialize
and Deserialize
when the serde
feature is enabled. Thanks for the heads-up!