Skip to main content

from_jsonl

Function from_jsonl 

Source
pub fn from_jsonl(text: &str) -> Result<Vec<UsageRecord>>
Expand description

Parse a JSONL usage log back into records — the exact inverse of to_jsonl. Blank lines are skipped (tolerates a trailing newline or hand-edited whitespace); a malformed line is a hard error (unlike the hooks/sidecar “fail open” posture — a corrupt usage record should be visible, not silently dropped, since it’s accounting data).