add into_json feature

This commit is contained in:
gengteng
2023-08-01 12:38:14 +08:00
parent b7fdcb15ff
commit 91ce221dd3
6 changed files with 52 additions and 4 deletions

View File

@@ -44,4 +44,8 @@ pub async fn get_page_by_json(
}
```
For more usage examples, please refer to the `basic.rs` and `custom.rs` files in the `tests` directory.
For more usage examples, please refer to the `basic.rs` and `custom.rs` files in the `tests` directory.
## Features
`into_json`: When this feature is enabled, validation errors will be serialized into JSON format and returned as the HTTP body.