From e447d7c95b071352009a5e3ad32a611da8f0d95c Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 24 May 2023 09:55:28 -0700 Subject: [PATCH] Note required 'json' crate feature in guide. Co-authored-by: Manuel <2084639+tennox@users.noreply.github.com> --- site/guide/5-responses.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/guide/5-responses.md b/site/guide/5-responses.md index c5bf662b..eda5c6b1 100644 --- a/site/guide/5-responses.md +++ b/site/guide/5-responses.md @@ -446,6 +446,8 @@ fn todo() -> Json { } ``` +! note: You must enable Rocket's `json` crate feature to use the [`Json`] type. + The `Json` type serializes the structure into JSON, sets the Content-Type to JSON, and emits the serialized data in a fixed-sized body. If serialization fails, a **500 - Internal Server Error** is returned.