-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Trying to follow example on nickel-org site for json decoding and it referenced using rustc-serialize. According to the interwebs, rustc-serialize is now deprecated and they recommend using serde (see https://github.com/rust-lang-deprecated/rustc-serialize). Would it be worth updating these docs to use serde as well?
Should be the following changes:
Add two dependencies to Cargo.toml:
serde = { version="0.1.0", features=["derive"] }
serde_json = "1.0"
then in the example, the rust code should use
:
use serde::{Deserialize, Serialize};
derive updates to serde's impl:
#[derive(Serialize,Deserialize,Debug)]
struct Person {
and the rest should be the same...
Metadata
Metadata
Assignees
Labels
No labels