Expand description
A Fuzzcheck mutator for serde_json::Value
.
Example usage with Fuzzcheck (see the guide if you’re unsure on how this works).
ⓘ
use std::str::FromStr;
use fuzzcheck::fuzz_test;
let result = fuzz_test(|value: &Value| {
let v = value.to_string();
let new_v = Value::from_str(&v).unwrap();
value == &new_v
})
.mutator(json_value_mutator())
.serde_serializer()
.default_sensor_and_pool()
.arguments_from_cargo_fuzzcheck()
.launch();
assert!(!result.found_test_failure)