Switch to the new custom_deserialize syntax

This commit is contained in:
Erick Tryzelaar
2015-03-19 07:49:42 -07:00
parent c8b2ad01b5
commit 5378d22708
11 changed files with 34 additions and 65 deletions
+2 -3
View File
@@ -46,7 +46,7 @@
//! from JSON via the serialization API. To be able to serialize a piece of data, it must implement
//! the `serde::Serialize` trait. To be able to deserialize a piece of data, it must implement the
//! `serde::Deserialize` trait. Serde provides provides an annotation to automatically generate
//! the code for these traits: `#[derive_serialize]` and `#[derive_deserialize]`.
//! the code for these traits: `#[derive(Serialize, Deserialize)]`.
//!
//! The JSON API also provides an enum `serde::json::Value` and a method `to_value` to serialize
//! objects. A `serde::json::Value` value can be serialized as a string or buffer using the
@@ -70,8 +70,7 @@
//! use serde::json;
//!
//! // Automatically generate `Serialize` and `Deserialize` trait implementations
//! #[derive_serialize]
//! #[derive_deserialize]
//! #[derive(Serialize, Deserialize)]
//! pub struct TestStruct {
//! data_int: u8,
//! data_str: String,