Skip to main content

read_json

Function read_json 

Source
pub fn read_json<T>(path: &Path, max_bytes: u64) -> Result<T, PersistenceError>
Expand description

Read one regular no-follow JSON file within an explicit byte limit.

Reuses the shared bounded regular-file reader; caller-selected parents and concurrent byte custody remain local. Only the final symlink is rejected.

ยงErrors

Rejects unsafe files, excessive bytes, invalid JSON and filesystem failures.