jder_axum 0.10.1

A response builder for axum
Documentation

JDER axum

A response builder for axum.

This package includes different axum response builders, extractors and layers based on the JSON response structure specified in JSON Data Errors Response (JDER). With the builders and extractors provided, various kinds of responses can be created easily instead of sending plain text responses.

Quick Start

Create a JSON response for an axum route:

use jder_axum::response::{
    Response,
    json::CreateJsonResponse,
};

async fn route() -> Response {
    CreateJsonResponse::dataless().create()
}

And the response will be shown as below:

{
    "success": true,
    "data": null,
    "errors": []
}

License

This project is licensed under the terms of the MIT license.