diff --git a/README.md b/README.md
index ed11e61c2..2d206c66d 100644
--- a/README.md
+++ b/README.md
@@ -81,9 +81,11 @@ A string of JSON data can be parsed into a `serde_json::Value` by the
[`from_reader`][from_reader] for parsing from any `io::Read` like a File or
a TCP stream.
+
```rust
use serde_json::{Result, Value};
@@ -139,9 +141,11 @@ in one of the dozens of places it is used in your code.
Serde provides a powerful way of mapping JSON data into Rust data structures
largely automatically.
+
```rust
use serde::{Deserialize, Serialize};
@@ -206,9 +210,11 @@ derive]* page of the Serde site.
Serde JSON provides a [`json!` macro][macro] to build `serde_json::Value`
objects with very natural JSON syntax.
+
```rust
use serde_json::json;
@@ -239,9 +245,11 @@ be interpolated directly into the JSON value as you are building it. Serde
will check at compile time that the value you are interpolating is able to
be represented as JSON.
+
```rust
let full_name = "John Doe";
@@ -270,9 +278,11 @@ A data structure can be converted to a JSON string by
[`serde_json::to_writer`][to_writer] which serializes to any `io::Write`
such as a File or a TCP stream.
+
```rust
use serde::{Deserialize, Serialize};