-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement serde Serialize/Deserialize for VersionReq #119
Comments
I'm not sure what the use-case is, so I'm not sure why it'd want to be custom. |
This is a type with a natural string form, so I thought it might want to be serialized in that form - for comparison, Version uses a custom serializer. A contributor can probably start out with derived serialization and hash it out on the PR. |
Oh, actually, my use case was to deserialize version requirements from the crates.io API into a VersionReq. I presume that would require a custom serializer / deserializer, but don't know for sure. In the crates.io API they are just strings that are shaped like version requirements. |
Yeah I mean, one problem with Maybe trying out the default one and seeing if it works for crates.io is the right call. |
`kind` has the specialised `DependencyKind`; `req` is just a string - see dtolnay/semver#119
`kind` has the specialised `DependencyKind`; `req` is just a string - see dtolnay/semver#119
Is this all sorted now? |
Seems it's already in release 0.8.0. Should be ok. |
As of Edit: semver = { version = "0.9.0", features = ["serde"] } that works. Had to read the |
This was implemented in #122. |
Only when the "serde" feature is enabled. It's implemented for
Version
but notVersionReq
. I imagine this wants a custom serializer, not a derived one. Maybe @steveklabnik you can say more about how this should be implemented and tag it help wanted.The text was updated successfully, but these errors were encountered: