Skip to content

Commit 8daa85b

Browse files
authored
Linked ReadMe to Using Derive page.
This helps to prevent a common problem (#564, #682) caused by not including `features = ["derive"]` and getting `cannot find derive macro `Serialize` in this scope` compiler error.
1 parent 631ce80 commit 8daa85b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ autocomplete field names to prevent typos, which was impossible in the
196196
when we write `p.phones[0]`, then `p.phones` is guaranteed to be a
197197
`Vec<String>` so indexing into it makes sense and produces a `String`.
198198

199+
Read [Using derive](https://serde.rs/derive.html)
200+
for details on setting up `#[derive(Serialize, Deserialize)]` macro.
201+
199202
## Constructing JSON values
200203

201204
Serde JSON provides a [`json!` macro][macro] to build `serde_json::Value`

0 commit comments

Comments
 (0)