Rust bindings for the cJSON library
Make sure you have the cJSON library properly installed your system.
-
Set the
CJSON_INCLUDE_PATHandCJSON_LIB_PATHenvironment variables:CJSON_INCLUDE_PATHspecifies where the compiler should look for thecJSON.hheader file during the compilation process eg./usr/include/cjson.CJSON_LIB_PATHspecifies where the linker should look for precompiled cJSON library files eg./usr/local/lib.
-
Update your
Cargo.tomlfile by adding this to the[dependencies]section:cjson-rs = "0.2.3"
-
Import the crate in your source file(s) to start using it:
use cjson_rs::*;
For detailed documentation, please refer to the documentation comments in the code. You can view it even
better in your browser by running this command in the cjson-rs project directory:
cargo doc --openContributions are much welcome! Feel free to open issues or create pull requests to contribute to this project.
This project is licensed under the MIT License.