#json-xml #xml #actix-web #json #proc-macro #actix

macro actix-default-responder

Procedural macro for generating default Responder implementation for a specific data type (ie. json, xml, etc).

1 unstable release

0.1.0 Jul 24, 2022

#1406 in Procedural macros

Download history 2526/week @ 2024-03-14 2124/week @ 2024-03-21 993/week @ 2024-03-28 2030/week @ 2024-04-04 1722/week @ 2024-04-11 2833/week @ 2024-04-18 2504/week @ 2024-04-25 2500/week @ 2024-05-02 4702/week @ 2024-05-09 2361/week @ 2024-05-16 2773/week @ 2024-05-23 1438/week @ 2024-05-30 2497/week @ 2024-06-06 2455/week @ 2024-06-13 3056/week @ 2024-06-20 2333/week @ 2024-06-27

10,470 downloads per month

MIT/Apache

6KB
63 lines

Actix Default Responder

Procedural macros for generating default actix_web::Responder implementation for a custom serialization.

Currently supported formats are:

1. JSON

2. Bincode

3. XML

Json Response

#[derive(Serialize, PartialEq, JsonResponder)]
struct JsonResponse {
    name: String,
}

XML Response

#[derive(Debug, Serialize, PartialEq, XMLResponder)]
struct XMLResponse {
    name: String,
}

Bincode Response

#[derive(Debug, Serialize, PartialEq, BincodeResponder)]
struct BincodeResponse {
    name: String,
}

Dependencies

~1.5MB
~35K SLoC