A strict JSON pull cursor over bytes: each key and value in order, strings borrowed when they have no escapes, and every number's exact text, with every byte checked against RFC 8259. No dependencies, no unsafe code, no_std.
//! What the integration tests share. Each test file uses its own part of it.
#![allow(dead_code)]/// How many random cases a test runs: `JSON_CURSOR_CASES`, or `default`.
pubfncases(default:usize)->usize{std::env::var("JSON_CURSOR_CASES").ok().and_then(|v|v.parse().ok()).unwrap_or(default)}/// xorshift64: a random source that gives the same values on every run.
pubstructRng(pub u64);implRng{pubfnnext(&mutself)->u64{letmut x =self.0;
x ^= x <<13;
x ^= x >>7;
x ^= x <<17;self.0= x;
x
}/// A number below `n`.
pubfnbelow(&mutself, n:usize)->usize{(self.next()% n asu64)asusize}pubfnpick<'t, T>(&mutself, items:&'t [T])->&'t T{&items[self.below(items.len())]}}