diff --git a/README.md b/README.md index f2377bbd..624054f8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ struct Point { ``` Serde bundles a high performance JSON serializer and deserializer, -[serde::json](http://serde-rs.github.io/serde/serde/json/index.html), +[serde_json](http://serde-rs.github.io/serde/serde_json/index.html), which comes with the helper functions [to_string](http://serde-rs.github.io/serde/serde/json/ser/fn.to_string.html) and @@ -47,7 +47,7 @@ and that make it easy to go to and from JSON: ```rust -use serde::json; +use serde_json; ... @@ -59,7 +59,7 @@ println!("{}", serialized_point); // prints: {"x":1,"y":2} let deserialize_point: Point = json::from_str(&serialized_point).unwrap(); ``` -[serde::json](http://serde-rs.github.io/serde/serde/json/index.html) also +[serde_json](http://serde-rs.github.io/serde/serde_json/index.html) also supports a generic [Value](http://serde-rs.github.io/serde/serde/json/value/enum.Value.html) type, which can represent any JSON value. Also, any diff --git a/serde_json/src/lib.rs b/serde_json/src/lib.rs index 56468518..2e13f2a4 100644 --- a/serde_json/src/lib.rs +++ b/serde_json/src/lib.rs @@ -6,7 +6,7 @@ //! encode structured data in a text format that can be easily read by humans. Its simple syntax //! and native compatibility with JavaScript have made it a widely used format. //! -//! Data types that can be encoded are JavaScript types (see the `serde::json:Value` enum for more +//! Data types that can be encoded are JavaScript types (see the `serde_json:Value` enum for more //! details): //! //! * `Boolean`: equivalent to rust's `bool` @@ -16,7 +16,7 @@ //! * `String`: equivalent to rust's `String` //! * `Array`: equivalent to rust's `Vec`, but also allowing objects of different types in the //! same array -//! * `Object`: equivalent to rust's `BTreeMap` +//! * `Object`: equivalent to rust's `BTreeMap` //! * `Null` //! //! An object is a series of string keys mapping to values, in `"key": value` format. Arrays are @@ -48,8 +48,8 @@ //! `serde::Deserialize` trait. Serde provides provides an annotation to automatically generate //! 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 +//! 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 //! functions described above. You can also use the `json::Serializer` object, which implements the //! `Serializer` trait. //! @@ -63,7 +63,7 @@ //! //! extern crate serde; //! -//! use serde::json::{self, Value}; +//! use serde_json::{self, Value}; //! //! fn main() { //! let data: Value = json::from_str("{\"foo\": 13, \"bar\": \"baz\"}").unwrap();