Skip to main content

Module json

Module json 

Source
Expand description

The JSON body extractor of every route that reads one. axum’s own Json answers a body it refuses with plain text carrying serde’s message, which quotes the request back and changes with serde. This one keeps axum’s status and answers a fixed ApiError instead.

Structs§

ApiJson
axum::Json, with its rejections answered as ApiErrors.
ApiJsonRejection
A body ApiJson refused, answered by its status alone.