Expand description
Bounded loading for untrusted reference-backend JSON fixtures.
Direct Serde deserialization remains available for trusted inputs. Callers processing untrusted JSON should choose a byte limit for the complete input before parsing; the limit is applied before any tensor data is allocated.
Functionsยง
- from_
slice_ with_ limit - Deserialize a complete reference JSON payload only when it fits
max_bytes. The limit covers the entire JSON document, including nested model weights.