Y
Hacker News
new
|
ask
|
show
|
jobs
by
Ar-Curunir
3247 days ago
It's the same with `rust` and `serde`; it's a great feeling!
1 comments
mrkgnao
3247 days ago
I can imagine :) I think over in Rust-land it's something like
#[derive(FromJSON)]
isn't it?
link
steveklabnik
3247 days ago
#[derive(Serialize, Deserialize)]
but yeah, same difference.
link
mrkgnao
3247 days ago
Ah. That derives both "ToJSON" and "FromJSON", as Aeson calls them. Cool!
link
steveklabnik
3247 days ago
Yeah, and it's actually more general than that: it describes how to serialize and deserialize them generally, so you could use, say, serde_json to get json, or serde_yaml to get yaml.
link
mrkgnao
3246 days ago
Huh, nice.
link