#json #rocket-web #rocket #web #rocket-framework #integer-value #server

rocket-json-response

This is a crate which provides JSONResponse and JSONResponseWithoutData structs to response JSON format data with an additional code integer value

27 releases

0.6.5 Nov 3, 2023
0.6.3 May 10, 2022
0.6.1 Mar 19, 2022
0.6.0 Aug 13, 2021
0.2.0 Nov 17, 2018

#1699 in Web programming

46 downloads per month
Used in mprober

MIT license

14KB
253 lines

JSON Response for Rocket Framework

CI

This is a crate which provides JSONResponse and JSONResponseWithoutData structs to response JSON format data with an additional code integer value.

Typically, the code 0 means OK. You can define other codes by yourself by implementing JSONResponseCode trait for your struct.

See examples.

Crates.io

https://crates.io/crates/rocket-json-response

Documentation

https://docs.rs/rocket-json-response

License

MIT


lib.rs:

JSON Response for Rocket Framework

This is a crate which provides JSONResponse and JSONResponseWithoutData structs to response JSON format data with an additional code integer value.

Typically, the code 0 means OK. You can define other codes by yourself by implementing JSONResponseCode trait for your struct.

See examples.

Dependencies

~18–54MB
~876K SLoC