Use this seed when the caller owns a deserializer and needs duplicate-key
rejection without requiring an intermediate typed wrapper.
Native i64, u64, and finite f64 events retain their numeric
representation. If an upstream deserializer exposes an arbitrary-precision
number as map events, this seed treats those events as an ordinary object
because it cannot determine their provenance. Lexical admission by
crate::decode::JsonDecoder does not change the subsequent Serde event
representation. See DuplicateKeyRejectingJsonValue for the corresponding
wrapper behavior and doc/number_contract.md in the repository for the
numeric contract.
For complete JSON input with native numeric events across feature
unification, use crate::decode::JsonDecoder::decode_unique_seed_utf8.
use qubit_json::value::DuplicateKeyRejectingJsonValueSeed;
use serde::de::DeserializeSeed;
let mut deserializer = serde_json::Deserializer::from_str(r#"{"ok":true}"#);
let value = DuplicateKeyRejectingJsonValueSeed::new().deserialize(&mut deserializer)?;
assert_eq!(value.into_inner()["ok"], true);