1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
extern crate serde; extern crate serde_json; // The serde_derive crate provides the macros for #[derive(Serialize)] and // #[derive(Deserialize)]. You won't need these for implementing a data format // but your unit tests will probably use them - hence #[cfg(test)]. #[cfg(test)] #[macro_use] extern crate serde_derive; mod error; mod ser; mod de; pub use error::{Error, Result}; pub use ser::{to_writer, Serializer}; pub use de::{from_str, Deserializer};