Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/irevoire/arbitrary-json
Implement Arbitrary on serde_json
https://github.com/irevoire/arbitrary-json
fuzzing json rust testing
Last synced: 9 days ago
JSON representation
Implement Arbitrary on serde_json
- Host: GitHub
- URL: https://github.com/irevoire/arbitrary-json
- Owner: irevoire
- License: wtfpl
- Created: 2022-01-12T17:23:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-23T11:09:44.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T19:18:52.904Z (15 days ago)
- Topics: fuzzing, json, rust, testing
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Arbitrary JSON
==============This crate provide a compatibility layer between
[serde_json](https://github.com/serde-rs/json) and
[arbitrary](https://github.com/rust-fuzz/arbitrary).
This allow you to generate random valid json when fuzzing your rust code. See
the following example:```rust
#![no_main]
use arbitrary_json::ArbitraryValue;
use libfuzzer_sys::fuzz_target;fuzz_target!(|data: ArbitraryValue| {
// call your very complex code here
if data["truc"] == serde_json::json!(42) {
panic!("Found the magic value");
}
});
```