Skip to main content

Module reference_json

Module reference_json 

Source
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.