diff --git a/README.md b/README.md index 9ecab2a6..90c266ca 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ the same speed as a hand written serializer for a specific type. Documentation is available at: -* [serde](https://serde-rs.github.io/serde/serde/serde/index.html) -* [serde\_json](https://serde-rs.github.io/serde/serde_json/serde_json/index.html) -* [serde\_codegen](https://serde-rs.github.io/serde/serde_codegen/serde_codegen/index.html) +* [serde](https://serde-rs.github.io/serde/serde/serde/serde/index.html) +* [serde\_json](https://serde-rs.github.io/serde/serde/serde_json/serde_json/index.html) +* [serde\_codegen](https://serde-rs.github.io/serde/serde/serde_codegen/serde_codegen/index.html) Using Serde with Nightly Rust and serde\_macros =============================================== @@ -237,9 +237,9 @@ Serialization without Macros Under the covers, Serde extensively uses the Visitor pattern to thread state between the -[Serializer](http://serde-rs.github.io/serde/serde/ser/trait.Serializer.html) +[Serializer](http://serde-rs.github.io/serde/serde/serde/ser/trait.Serializer.html) and -[Serialize](http://serde-rs.github.io/serde/serde/ser/trait.Serialize.html) +[Serialize](http://serde-rs.github.io/serde/serde/serde/ser/trait.Serialize.html) without the two having specific information about each other's concrete type. This has many of the same benefits as frameworks that use runtime type information without the overhead. In fact, when compiling with optimizations, @@ -248,7 +248,7 @@ nearly as fast as a hand written serializer format for a specific type. To see it in action, lets look at how a simple type like `i32` is serialized. The -[Serializer](http://serde-rs.github.io/serde/serde/ser/trait.Serializer.html) +[Serializer](http://serde-rs.github.io/serde/serde/serde/ser/trait.Serializer.html) is threaded through the type: ```rust @@ -263,9 +263,9 @@ impl serde::Serialize for i32 { As you can see it's pretty simple. More complex types like `BTreeMap` need to pass a -[MapVisitor](http://serde-rs.github.io/serde/serde/ser/trait.MapVisitor.html) +[MapVisitor](http://serde-rs.github.io/serde/serde/serde/ser/trait.MapVisitor.html) to the -[Serializer](http://serde-rs.github.io/serde/serde/ser/trait.Serializer.html) +[Serializer](http://serde-rs.github.io/serde/serde/serde/ser/trait.Serializer.html) in order to walk through the type: ```rust @@ -377,11 +377,11 @@ Deserialization without Macros Deserialization is a little more complicated since there's a bit more error handling that needs to occur. Let's start with the simple `i32` -[Deserialize](http://serde-rs.github.io/serde/serde/de/trait.Deserialize.html) +[Deserialize](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserialize.html) implementation. It passes a -[Visitor](http://serde-rs.github.io/serde/serde/de/trait.Visitor.html) to the -[Deserializer](http://serde-rs.github.io/serde/serde/de/trait.Deserializer.html). -The [Visitor](http://serde-rs.github.io/serde/serde/de/trait.Visitor.html) +[Visitor](http://serde-rs.github.io/serde/serde/serde/de/trait.Visitor.html) to the +[Deserializer](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserializer.html). +The [Visitor](http://serde-rs.github.io/serde/serde/serde/de/trait.Visitor.html) can create the `i32` from a variety of different types: ```rust @@ -416,9 +416,9 @@ impl serde::de::Visitor for I32Visitor { Since it's possible for this type to get passed an unexpected type, we need a way to error out. This is done by way of the -[Error](http://serde-rs.github.io/serde/serde/de/trait.Error.html) trait, +[Error](http://serde-rs.github.io/serde/serde/serde/de/trait.Error.html) trait, which allows a -[Deserialize](http://serde-rs.github.io/serde/serde/de/trait.Deserialize.html) +[Deserialize](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserialize.html) to generate an error for a few common error conditions. Here's how it could be used: ```rust @@ -435,9 +435,9 @@ to generate an error for a few common error conditions. Here's how it could be u ``` Maps follow a similar pattern as before, and use a -[MapVisitor](http://serde-rs.github.io/serde/serde/de/trait.MapVisitor.html) +[MapVisitor](http://serde-rs.github.io/serde/serde/serde/de/trait.MapVisitor.html) to walk through the values generated by the -[Deserializer](http://serde-rs.github.io/serde/serde/de/trait.Deserializer.html). +[Deserializer](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserializer.html). ```rust impl serde::Deserialize for BTreeMap