Drop rustc-serialize dependency
dtolnay opened this issue · comments
It has been deprecated: announcement.
Is there any functionality you would require from Serde or another library before this would be possible?
Based on a cursory look at the code, the substitution would be easy. Are you in favor, maintainer?
@sanmai-NL of course I am in favor, but I haven't much free time to work on this issue.
Hi.
I've tried to do the migration. This is actually not so simple as it seems since serde is using more String
s instead of &str
. It's still doable at the price of some clones/unwraps that will probably change API a bit in some places.
Here's the patch with Directory migrated to serde_json::Value
instead of rustc_serialize::Json
:
https://github.com/Albibek/letsencrypt-rs/commit/61ba44c4a404fa3845e57a6b0474cf2127e6e890
Let me know if you are interested, I'll finish the migration. and submit a PR. Also let me know if you want to stick to some really fixed serde semver including minors - I'll change the versions as well.
Cheerz.
The equivalent of rustc_serialize::json::Json::as_string
is serde_json::Value::as_str
. Was that the only String vs &str issue you saw?
Oh my bad. I was wrong about this function, thinking it should do a full serialize. I will try again. Anyways, my question about you being interested is still actual :).
@Albibek thanks for working on this issue. Yes, we still want to drop rustc-serialize and use serde on this crate 👍
I believe we can achieve this without changing public API and unwraps. None of the public API functions are using a rustc-serialize type.