Use a nonrandom hasher when decoding JSON

This commit is contained in:
Kerollmops 2024-12-11 12:04:29 +01:00
parent 93fbdc06d3
commit 01bcc601be
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -221,7 +221,7 @@ pub fn read_json(input: &File, output: impl io::Write) -> Result<u64> {
let mut deserializer = serde_json::Deserializer::from_slice(&input);
let res = array_each(&mut deserializer, |obj: &RawValue| {
doc_alloc.reset();
let map = RawMap::from_raw_value(obj, &doc_alloc)?;
let map = RawMap::from_raw_value_and_hasher(obj, FxBuildHasher, &doc_alloc)?;
to_writer(&mut out, &map)
});
let count = match res {