#json #rocket-web

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

#657 in Web programming

Download history 8/week @ 2024-08-03 1/week @ 2024-08-10 241/week @ 2024-09-28

241 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–50MB
~844K SLoC