#json #rocket-web #rocket #web #web-server #rocket-framework #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

#1713 in Web programming

Download history 7/week @ 2024-08-06 1/week @ 2024-09-24 4/week @ 2024-10-01

103 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–49MB
~843K SLoC