mirror of https://github.com/rwf2/Rocket.git
Note required 'json' crate feature in guide.
Co-authored-by: Manuel <2084639+tennox@users.noreply.github.com>
This commit is contained in:
parent
36a5c82e8b
commit
e447d7c95b
|
@ -446,6 +446,8 @@ fn todo() -> Json<Task> {
|
|||
}
|
||||
```
|
||||
|
||||
! 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.
|
||||
|
|
Loading…
Reference in New Issue